Search Issue Tracker

By Design

Votes

0

Found in

5.3.4f1

Issue ID

791597

Regression

No

[PCMReaderCallback] Streamed audio clip is cut short

Audio

-

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.

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.