XamarinAudioManager
XamarinAudioManager copied to clipboard
Mixed-up use of EffectsOn and MusicOn in DroidAudioManager
While in the iOS class querying the MusicOn property in RestartBackgroundMusic() and querying EffectsOn in PlaySound() seems to be logically correct, ...
public async TaskRestartBackgroundMusic() { // Music enabled? if (!MusicOn) return false; ... } public async Task PlaySound(string filename) { // Music enabled? if (!EffectsOn) return false; ... }
... in DroidAudioManager.cs the implementation looks like a bug:
public async TaskRestartBackgroundMusic() { // Music enabled? if (!EffectsOn) return false; ... } public async Task PlaySound(string filename) { // Music enabled? if (!MusicOn) return false; ... }
For playing music the effects property is used and for playing effects, the music property is used.
Good catch I will get this corrected this week.