nxplayer:add sbc simple parser in nxplayer

Usage:
device /dev/audio/compress0p
play /data/test.sbc

This function requires the platform to support compress decoding and playback

Signed-off-by: shipei <shipei@xiaomi.com>
This commit is contained in:
shipei 2023-06-08 20:03:06 +08:00 • committed by Xiang Xiao
parent 987cb1ebd9
commit 5aaf4136bf
5 changed files with 251 additions and 2 deletions

View file

@ -506,6 +506,23 @@ int nxplayer_systemreset(FAR struct nxplayer_s *pplayer);
int nxplayer_parse_mp3(int fd, FAR uint32_t *samplerate,
FAR uint8_t *chans, FAR uint8_t *bps);
/****************************************************************************
* Name: nxplayer_parse_sbc
*
* Performs pre-process when play sbc file.
* Parse samplerate, channels, bps.
*
* Input Parameters:
* pplayer - Pointer to the context to initialize
*
* Returned Value:
* OK if file parsed successfully.
*
****************************************************************************/
int nxplayer_parse_sbc(int fd, FAR uint32_t *samplerate,
FAR uint8_t *chans, FAR uint8_t *bps);
/****************************************************************************
* Name: nxplayer_fill_mp3
*