android-audio-bypass icon indicating copy to clipboard operation
android-audio-bypass copied to clipboard

Facilitate run-time switching between AudioSource and BypassAudioSource

Open fadden opened this issue 10 years ago • 0 comments

It'd be useful if switching between an AudioSource and BypassAudioSource were simple. For example, if "audio bypass" were switched off, or the device isn't an Android device, BypassAudioSource would simply forward the request to AudioSource. Scripts could be written to play through one type of audio object and the bypass manager would route things appropriately.

The trick is in setting up the audio files themselves. Unity 5.1 makes life harder by discouraging AudioSources from being associated with WAV files in the StreamingAssets folder. Since BypassAudioSource can only find WAV files in StreamingAssets, it means the different sources can't share sound files. Having two copies of every sound file isn't awesome, so run-time switching may not be all that interesting.

fadden avatar Nov 05 '15 18:11 fadden