mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-10-29 05:40:23 -04:00
format: Add correct sample spec conversion for E-AC3
IEC61937-encapsulated E-AC3 frames contain 6 audio blocks per substream, which corresponds to 1536 samples contained a 24576-byte frame. To cope with this, we maintain the s16le stereo sample spec, but quadruple the sample rate so that the conversion remains accurate.
This commit is contained in:
parent
13a33abf45
commit
d1f13fa781
1 changed files with 3 additions and 0 deletions
|
|
@ -203,5 +203,8 @@ pa_bool_t pa_format_info_to_sample_spec_fake(pa_format_info *f, pa_sample_spec *
|
|||
pa_return_val_if_fail(r = pa_proplist_gets(f->plist, PA_PROP_FORMAT_RATE), FALSE);
|
||||
pa_return_val_if_fail(pa_atou(r, &ss->rate) == 0, FALSE);
|
||||
|
||||
if (f->encoding == PA_ENCODING_EAC3_IEC61937)
|
||||
ss->rate *= 4;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue