mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-10-29 05:40:27 -04:00
alsa: fix rate for EAC3
EAC3 needs to be opened in 4x the rate of the EAC3 stream, which can be 32, 44.1 or 48 KHz. Some clients already multiply but others don't. Check here what is the case and fix it up. Fixes #1902
This commit is contained in:
parent
7b26384388
commit
738cbcf789
1 changed files with 5 additions and 1 deletions
|
|
@ -1162,7 +1162,11 @@ int spa_alsa_set_format(struct state *state, struct spa_audio_info *fmt, uint32_
|
|||
case SPA_AUDIO_IEC958_CODEC_MPEG2_AAC:
|
||||
break;
|
||||
case SPA_AUDIO_IEC958_CODEC_EAC3:
|
||||
rrate *= 4;
|
||||
/* EAC3 has 3 rates, 32, 44.1 and 48KHz. We need to
|
||||
* open the device in 4x that rate. Some clients
|
||||
* already multiply (mpv,..) others don't (vlc). */
|
||||
if (rrate <= 48000)
|
||||
rrate *= 4;
|
||||
break;
|
||||
case SPA_AUDIO_IEC958_CODEC_TRUEHD:
|
||||
case SPA_AUDIO_IEC958_CODEC_DTSHD:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue