Search Issue Tracker
By Design
Votes
0
Found in
5.6.1f1
Issue ID
922465
Regression
No
MonoBehaviour::OnAudioReadFilter processing does not affect audio when AudioSource::PlayOnAwake is checked
To reproduce:
1. Open the "UnityPlayOnAwakeBug" scene in the attached project
2. Select the "Trigger Source" Game Object from the Hierarchy
3. Uncheck the "Play On Awake" in the Inspector in Audio Source component
4. Play the scene and press "P" to hear how audio should sound
5. Stop the scene and check "Play On Awake" in the Inspector once again
6. Play the scene and press "P"
Desired outcome: Audio clip sounds the same as being played with "Play On Awake" unchecked.
Actual result: Audio clip sound is significantly louder when "Play On Awake" is checked.
Note: The issue seems to happen only when there is no AudioClip attached in the Audio Source component (when AudioClip is called from another script).
Reproduced with 5.5.4p1, 5.6.0b3, 5.6.1f1, 5.6.2f1, 2017.1.0a1, 2017.1.0f1, 2017.2.0b1
Update: The issue is by design, because when there is an AudioSource that has no clip assigned but does have a MonoBehaviour implementing OnAudioFilterRead, it will instantiate the OnAudioFilterRead as a source when the sound is started either via the "Play On Awake" flag or a regular Play() call. When “Play On Awake” is off and Play() is not called, the PlayOneShot call will instantiate the OnAudioFilterRead as an effect that filters the signal mix of the one-shot sources.
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