Search Issue Tracker
By Design
Votes
4
Found in
5.3.4f1
Issue ID
800264
Regression
No
AudioSource.GetOutputData returns an empty array the first time it is called
Reproduction steps:
1. Open the attached project
2. Open the "GetOutputData" Scene
3. Play
4. Notice that GameObject GetOutputData has an Audio Samples array which is full of zeros
5. Press Q to call AudioSource.GetOutputData function
6. Notice that AudioSamples array is still empty
7. Press Q again and notice that AudioSamples array has received data
Actual result: AudioSource.GetOutputData returns an empty array the first time it is called
Expected result: an array is expected to be filled the first time GetOutputData is called
Workaround: Calling this function twice returns audio data as expected
Reproduced on: 5.1.4f1, 5.2.4f1, 5.3.5p1, 5.4.0b19
By design: GetAudioData returns whatever is playing in the history buffer of the sound playing. If it wasn't that, it would have to be a consume operation or part of the mixer thread.
Considering that this is called before the sound is playing, the history buffer is naturally empty.
Comments (1)
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Tile Palette grid is moved after entering Play Mode
- Tile Palette Edit mode turns off in Play Mode
- The Editor crashes when Generating Font Atlas in the Font Asset Creator with “9999999999” padding and 256x256 Atlas Resolution
- [iOS] An “ArgumentNullException” error is thrown when GetIntroductoryPriceDictionary() method is called
- Font Import Settings documentation page is missing when the documentation button is pressed in the Inspector window
Danny-vda
Jun 05, 2016 22:05
also reproduced on 5.4.0.b20