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
- Incorrect color values are saved for Swatches when using HDR Color Picker
- Editor crashes when adding/removing a UI Document Style Sheet while in Play mode
- Scene and Game views turn black when all light sources are disabled
- Memory spike after activating Freeform Light2Ds
- Line Renderer Component elements do not fit in the Inspector window when minimising Inspector window is minimised
Danny-vda
Jun 05, 2016 22:05
also reproduced on 5.4.0.b20