mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-02 09:01:46 -05:00
bluetooth: ldac: Use format as FLOAT32LE
LDAC encoder already supports S16, S24, S32 and F32LE. Using FLOAT32LE for the sample format would avoid the additional call for conversion to pa_sconv_s32le_from_float32ne. perf tool shows this as being the function called frequently after encode. So, just avoid this by using sample format as F32LE. Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/486>
This commit is contained in:
parent
9431e96ae4
commit
c686215268
2 changed files with 4 additions and 1 deletions
|
|
@ -321,6 +321,9 @@ static GstCaps *gst_create_caps_from_sample_spec(const pa_sample_spec *ss) {
|
|||
case PA_SAMPLE_S32LE:
|
||||
sample_format = "S32LE";
|
||||
break;
|
||||
case PA_SAMPLE_FLOAT32LE:
|
||||
sample_format = "F32LE";
|
||||
break;
|
||||
default:
|
||||
pa_assert_not_reached();
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -208,7 +208,7 @@ bool gst_init_ldac(struct gst_info *info, pa_sample_spec *ss, bool for_encoding)
|
|||
return false;
|
||||
}
|
||||
|
||||
ss->format = PA_SAMPLE_S32LE;
|
||||
ss->format = PA_SAMPLE_FLOAT32LE;
|
||||
|
||||
switch (info->a2dp_codec_t.ldac_config->frequency) {
|
||||
case LDAC_SAMPLING_FREQ_44100:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue