if (g_ws_message_callback != NULL) {
g_ws_message_callback(NULL, WS_CMD_AUDIO_PLAYBACK_START);
}
- int ret = a2dp_src_start_playing(ln_bt_get_last_conned_device_Addr()); // 设置耳机的状态为播放
+ extern bool a2dp_is_connect;
+ if(a2dp_is_connect)
+ {
+ int ret = a2dp_src_start_playing(ln_bt_get_last_conned_device_Addr()); // 设置耳机的状态为播放
- LN_WS_DEBUG("a2dp_src_start_playing %d \n", ret);
+ LN_WS_DEBUG("a2dp_src_start_playing %d \n", ret);
+ }
+
}
g_audio_playback_active = true;
if (g_ws_message_callback != NULL) {
g_ws_message_callback(NULL, WS_CMD_AUDIO_PLAYBACK_END);
}
+ extern bool a2dp_is_connect;
+ if(a2dp_is_connect)
+ {
+ int ret = a2dp_src_suspend_playing(ln_bt_get_last_conned_device_Addr()); // 设置耳机的状态为播放
- int ret = a2dp_src_suspend_playing(ln_bt_get_last_conned_device_Addr()); // 设置耳机的状态为播放
-
- LN_WS_DEBUG("a2dp_src_suspend_playing %d \n", ret);
+ LN_WS_DEBUG("a2dp_src_suspend_playing %d \n", ret);
+ }
return true; // 播放已完成
}