diff options
author | Arun Raghavan <arun.raghavan@collabora.co.uk> | 2011-04-09 09:36:25 +0530 |
---|---|---|
committer | Arun Raghavan <arun.raghavan@collabora.co.uk> | 2011-05-15 10:09:35 +0530 |
commit | d1f13fa781ec69e4dbed000902123d255baaba5f (patch) | |
tree | e30fa3e365bdc9b61b7d6ce4486f982c9b888959 | |
parent | 13a33abf45f31417076f283ca7da9d9f74892286 (diff) |
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.
-rw-r--r-- | src/pulse/format.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/pulse/format.c b/src/pulse/format.c index a634b27b..84df76b4 100644 --- a/src/pulse/format.c +++ b/src/pulse/format.c @@ -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; } |