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
- “Remove Unused Overrides” available on not loaded Scene and throws “ArgumentException: The scene is not loaded” warning
- Adaptive Probe Volume occlusion edge is calculated incorrectly when viewing probes near geometry edges
- Sampling a texture using an HLSL file throws shader errors and the code does not compile
- "Graphics.CopyTexture called with null source texture" error when Base Camera of an Overlay Camera is removed with DX11 Graphics API and Compatibility Mode enabled
- WebGL sends wrong value with large numbers when SendMessage function is used
Add comment