📄 a2dp_sd_suspend.c
字号:
/****************************************************************************
Copyright (C) Cambridge Silicon Radio Ltd. 2004-2006
Part of BlueLab 3.6.2-release
FILE NAME
a2dp_sd_suspend.c
DESCRIPTION
NOTES
*/
/****************************************************************************
Header files
*/
#include "a2dp_sd_private.h"
#include "a2dp_sd_suspend.h"
#include "a2dp_sd_kalimba.h"
static void handleSuspend(const a2dpSourceDongleTaskData *theApp)
{
/* Update the local state to show we're no longer streaming */
avSourceDongleUpdateA2dpState(a2dp_state_connected);
/* Stop the DSP */
a2dpSdKalimbaStop(theApp);
}
/****************************************************************************
NAME
a2dpSdHandleSuspendCfm
DESCRIPTION
Handle a suspend cfm message from the A2DP lib.
RETURNS
void
*/
void a2dpSdHandleSuspendCfm(const a2dpSourceDongleTaskData *theApp, const A2DP_SUSPEND_CFM_T *cfm)
{
/* Suspend is an optional signal so we only stop the DSP if the sink supports it. */
if (cfm->result == a2dp_success)
handleSuspend(theApp);
}
/****************************************************************************
NAME
a2dpSdHandleSuspendInd
DESCRIPTION
The sink has suspended the connection.
RETURNS
void
*/
void a2dpSdHandleSuspendInd(const a2dpSourceDongleTaskData *theApp)
{
/* Cancel any stream request messages */
(void) MessageCancelAll(getTheAppTask(), APP_START_STREAMING_REQ);
/* Suspend the DSP */
handleSuspend(theApp);
}
/****************************************************************************
NAME
a2dpSdSuspendRequest
DESCRIPTION
Request to suspend streaming to the remote end.
RETURNS
*/
void a2dpSdSuspendRequest(const a2dpSourceDongleTaskData *theApp)
{
a2dpSdHandleSuspendInd(theApp);
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -