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:
Sanchayan Maity 2021-01-22 16:26:52 +05:30
parent 9431e96ae4
commit c686215268
2 changed files with 4 additions and 1 deletions

View file

@ -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;