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
- Mono Windows Builds don't produce full log callstacks when generating logs
- AssetBundles fail to load when running in Built Players for Mobile Devices
- UI elements with text gets bigger and grey when Player window is moved to another screen with different resolution
- System name accepts multiline text but crops it on confirmation, duplicates input, and shrinks the field when empty
- UI element scale and position are wrong in project build when DRS is changed with HDR and Software Dynamic Resolution enabled
Add comment