Exemplo n.º 1
0
        public async Task SetPiAudioState(PiAudioState state)
        {
            switch (state)
            {
            case PiAudioState.Mute:
                await Pi.Audio.ToggleMute(true).ConfigureAwait(false);

                Logger.Log("pi audio is muted.");
                break;

            case PiAudioState.Unmute:
                await Pi.Audio.ToggleMute(false).ConfigureAwait(false);

                Logger.Log("pi audio is un-muted.");
                break;
            }
        }
Exemplo n.º 2
0
        public async Task SetPiAudioState(PiAudioState state)
        {
            if (!IsAllowedToRun)
            {
                return;
            }

            switch (state)
            {
            case PiAudioState.Mute:
                await Pi.Audio.ToggleMute(true).ConfigureAwait(false);

                Logger.Log("Pi audio is muted.");
                break;

            case PiAudioState.Unmute:
                await Pi.Audio.ToggleMute(false).ConfigureAwait(false);

                Logger.Log("Pi audio is Unmuted.");
                break;
            }
        }