QCC30xx 51xx 如何获取当前听音乐时间 /*!
@file
@ingroup sink_app
@brief a2dp initialisation and control functions
*/
#include "sink_private_data.h"
#include "sink_main_task.h"
#include "sink_statemanager.h"
#include "sink_states.h"
#include "sink_a2dp.h"
#include "sink_a2dp_capabilities.h"
#include "sink_a2dp_aptx_adaptive.h"
#include "sink_devicemanager.h"
#include "sink_link_policy.h"
#include "sink_audio.h"
#include "sink_usb.h"
#include "sink_wired.h"
#include "sink_scan.h"
#include "sink_audio_routing.h"
#include "sink_slc.h"
#include "sink_device_id.h"
#include "sink_partymode.h"
#include "sink_config.h"
#include "sink_auth.h"
#include "sink_peer.h"
#include "sink_avrcp.h"
#include "sink_peer_qualification.h"
#include "sink_linkloss.h"
#include "sink_callmanager.h"
#include "sink_volume.h"
#include "sink_gaia.h"
#ifdef ENABLE_SUBWOOFER
#include "sink_swat.h"
#endif
#include "sink_hfp_data.h"
#include "sink_music_processing.h"
#include "sink_auto_power_off.h"
#ifdef ENABLE_AVRCP
#include "sink_tones.h"
#endif
#include "sink_ba.h"
#include "sink_powermanager.h"
#include <util.h>
#include <bdaddr.h>
#include <a2dp.h>
#include <connection.h>
#include <hfp.h>
#include <stdlib.h>
#include <panic.h>
#include <ps.h>
#include <message.h>
#include <audio_plugin_music_variants.h>
#include <audio_music_processing.h>
#include <audio_config.h>
#include <config_store.h>
#include <gain_utils.h>
#include <audio.h>
#include "sink_slc.h"
#include "sink_upgrade.h"
#include "config_definition.h"
#include "sink_a2dp_config_def.h"
#include "sink_malloc_debug.h"
#ifdef SBC_ENCODER_CONFORMANCE
#include "sink_sbc.h"
#endif
#ifdef DEBUG_A2DP
#define A2DP_DEBUG(x) DEBUG(x)
#ifdef ENABLE_PEER
static const char * const rdname[] = { "Unknown", "Non-Peer", "Peer" };
#endif
#else
#define A2DP_DEBUG(x)
#endif
/* Helper macro for converting a bypass bit flag into a boolean type. */
#define MusicEnhancementBypassed(enhancements, bypass_flag) (((enhancements) & (bypass_flag)) == (bypass_flag))
#ifdef ENABLE_PEER
#define SBC_SAMPLING_FREQ_16000 128
#define SBC_SAMPLING_FREQ_32000 64
#define SBC_SAMPLING_FREQ_44100 32
#define SBC_SAMPLING_FREQ_48000 16
#define SBC_CHANNEL_MODE_MONO 8
#define SBC_CHANNEL_MODE_DUAL_CHAN 4
#define SBC_CHANNEL_MODE_STEREO 2
#define SBC_CHANNEL_MODE_JOINT_STEREO 1
#define SBC_BLOCK_LENGTH_4 128
#define SBC_BLOCK_LENGTH_8 64
#define SBC_BLOCK_LENGTH_12 32
#define SBC_BLOCK_LENGTH_16 16
#define SBC_SUBBANDS_4 8
#define SBC_SUBBANDS_8 4
#define SBC_ALLOCATION_SNR 2
#define SBC_ALLOCATION_LOUDNESS 1
/* True Wireless Stereo Codec ID configured using either SBC, MP3, AAC or APTX type capabilities.
* As a default configuration refer tws_sbc_caps for mandate SBC type media codec service category fixed offset value */
#define MEDIA_TRANSPORT_SERVICE_CATEGORY_OFFSET 2
#define CONFIGURED_MEDIA_CODEC_OFFSET 12
/* Codec caps to use for a TWS Source SEP when 16KHz SBC is required */
const uint8 sbc_caps_16k[8] =
{
AVDTP_SERVICE_MEDIA_CODEC,
6,
AVDTP_MEDIA_TYPE_AUDIO<