?? mute.c
字號:
#include "demohs.h"
#include <audio.h>
static const audio_note mute_beep[] =
{
AUDIO_TEMPO(80), AUDIO_VOLUME(32), AUDIO_TIMBRE(sine),
AUDIO_NOTE(G5, QUAVER),
AUDIO_END
};
static Delay delayMuteBeepPlay(TimerHandle h)
{
h = h;
hsState.AudioRingHandle = AudioPlay(mute_beep);
return MUTE_BEEP_DELAY;
}
/*
muteRequest
Toggles the current mute state i.e. if mute was on turns it off and vice versa
*/
void muteRequest(void)
{
uint16 want = hsState.isMuted ^ 1;
if(AudioMuteMicrophone(want))
hsState.isMuted = want;
if (!hsState.isMuted)
{
/* Stop playing beeps */
(void) AudioStop(hsState.AudioRingHandle);
(void) TimerCancelCallback(delayMuteBeepPlay);
}
else if (hsState.scoConnected)
{
/*
If we have a SCO connected and the mic is muted play beeps
until it is unmuted. Reuse the ring handle for now.
*/
(void) TimerAdd(D_mSEC(MUTE_BEEP_DELAY), delayMuteBeepPlay);
}
}
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -