- Home /
AudioHighPassFilter with multiple AudioSource
Hello, I am coding a small audio manager for a scene in a supermarket.
My manager holds a list of objects containing audio sources, which are constantly playing a song. At specific time intervals the manager adds a second AudioSource ( to the same GameObject ) which plays a short announcement. The new audio source is then destroyed at the end of the announcement.
Each audio source contains an AudioHighPassFilter, which works just fine for the song, but as soon as the announcement AudioSource is created, I get this warning:
Only custom filters can be played. Please add a custom filter or an audioclip to the audiosource. UnityEngine.GameObject:AddComponent(String)
After the announcement has finished playing, the filter does not work anymore.
Any idea on how to solve it?
The same happens to me, and I'd be curious why. I have Unity Pro so that can't be the reason
Answer by transparent-room · Jan 27, 2017 at 09:04 PM
This is an old post, and the problem has most likely been worked around, abandoned, or something. However, I ran across the same warning today (with a single Audio Source even) and I found out that I had "Play on Awake" checked in the Audio Source by mistake, when the audio clips are loaded and played by a script... So once I unchecked Play on Awake, the warning went away... Hope it helps someone.
Your answer
Follow this Question
Related Questions
How can I play multiple audioclips from the same object? 2 Answers
Play audio clip without a variable 1 Answer
Music Visualiser Troubles 0 Answers
Multiple audioSources on same gameObject? 1 Answer
Audio.Play() not showing up 1 Answer