XamarinAudioManager icon indicating copy to clipboard operation
XamarinAudioManager copied to clipboard

Mixed-up use of EffectsOn and MusicOn in DroidAudioManager

Open denis-reichelt opened this issue 8 years ago • 1 comments

While in the iOS class querying the MusicOn property in RestartBackgroundMusic() and querying EffectsOn in PlaySound() seems to be logically correct, ...


        public async Task RestartBackgroundMusic()
        {
            // 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 Task RestartBackgroundMusic()
        {
            // 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.

denis-reichelt avatar Feb 09 '17 14:02 denis-reichelt

Good catch I will get this corrected this week.

jcphlux avatar Feb 13 '17 15:02 jcphlux