Search Issue Tracker
By Design
Votes
0
Found in
5.3.4f1
Issue ID
791597
Regression
No
[PCMReaderCallback] Streamed audio clip is cut short
How to reproduce:
1. Open the attached project
2. Change the audio file path in Scripts/TestComponent.cs
3. Play the app in the editor or as a standalone
4. Press 'B' to play the MP3 by buffering the entire file and copying the data to an audio clip. You can hear the entire sound. The number of samples in the file is printed to the console from OneShotAudioSourceComponent.cs.
5. Press 'S' to play the MP3 by streaming data into a looping audio clip using AudioClip.PCMReaderCallback. The code to do this is scattered throughout AudioUtils.cs, but I don't think it's a problem with my code. The number of samples that are streamed is printed to the console after the sound is done playing.
6. Press 'D' (after pressing 'S' and letting the audio play) to playback the samples that were streamed to Unity and saved in a buffer (AudioUtils.DEBUG_SAMPLES). The entire audio clip plays, so my code is definitely streaming all of the audio to Unity.
User was not implementing seek callbacks.
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Out-of-bounds memory access with multiple CanvasRenderers under a Canvas when using Mesh API
- Inspector tries to access file after it was deleted when the file was locked in Inspector window
- Changing Transform values in Search window Inspector loses focus while dragging and stopping mouse without releasing dragging action
- Saving changes on the dirty VFX Graph during the Play mode throws "The referenced script (Unknown) on this Behaviour is missing!" warnings
- VFX Graph Debug Info overlaps the "Initialize" block debug info by default
Add comment