[one part solved] which format as audio src for A2dp source example is supported?
Posted: Thu Feb 08, 2018 6:28 pm
Hi guys
does someone know, which audio format as source is supported by the A2db source example as data?
- is uncompressed wav 16bit stereo supported ? MSB ?
- which source formats also supported ?
- does SBC function can read a header or RAW data only ?
- have we an option to select which source we gives the SBC encoder ?
where we must set this?
example ( where is this setup ) :
Audio channels:
--Mono (1 channel)
--Stereo (2 channels)
Audio sample type:
--Unsigned 8-bit PCM
--Signed 16-bit little endian PCM
Audio sample rate:
--8000 ~ 48000 Hz
is there likewise ?
audio_in_get_channel(), audio_in_get_sample_type() , audio_in_get_sample_rate()
- must we decode mp3 files to uncompressed 16bit stereo first to send it to the SBC encoder ?
from where the SBC encoder knows this, which (properties) PCM RAW stream is as source?
EDIT: esp_a2d_source_init
further things are in the binary BT LIB and we did not know more about details -
only that this is PCM stream.. perhabs i read the things wrong?
best wishes
rudi
btw:
this gives me a simple test tone ( not to loud ) without noices
does someone know, which audio format as source is supported by the A2db source example as data?
Code: Select all
static int32_t bt_app_a2d_data_cb(uint8_t *data, int32_t len)
{
if (len < 0 || data == NULL) {
return 0;
}
// generate random sequence
int val = rand() % (1 << 16);
for (int i = 0; i < (len >> 1); i++) {
data[(i << 1)] = val & 0xff;
data[(i << 1) + 1] = (val >> 8) & 0xff;
}
return len;
}
- which source formats also supported ?
- does SBC function can read a header or RAW data only ?
- have we an option to select which source we gives the SBC encoder ?
where we must set this?
example ( where is this setup ) :
Audio channels:
--Mono (1 channel)
--Stereo (2 channels)
Audio sample type:
--Unsigned 8-bit PCM
--Signed 16-bit little endian PCM
Audio sample rate:
--8000 ~ 48000 Hz
is there likewise ?
audio_in_get_channel(), audio_in_get_sample_type() , audio_in_get_sample_rate()
- must we decode mp3 files to uncompressed 16bit stereo first to send it to the SBC encoder ?
from where the SBC encoder knows this, which (properties) PCM RAW stream is as source?
EDIT: esp_a2d_source_init
further things are in the binary BT LIB and we did not know more about details -
only that this is PCM stream.. perhabs i read the things wrong?
best wishes
rudi
btw:
this gives me a simple test tone ( not to loud ) without noices
Code: Select all
static int32_t bt_app_a2d_data_cb(uint8_t *data, int32_t len)
{
if (len < 0 || data == NULL) {
return 0;
}
for (int i = 0; i < (len >> 1); i++) {
data[(i << 1)] = 0x20;
data[(i << 1) + 1] = 0x20;
return len;
}