Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Add ALSA playback support for 24 bits LSB audio.

Fixes #10081
  • Loading branch information...
commit a24ecbf706b2989a5a6cb583d5efad50719d5454 1 parent 35468d7
@jyavenard jyavenard authored
View
22 mythtv/libs/libmyth/audiooutputalsa.cpp
@@ -339,11 +339,12 @@ AudioOutputSettings* AudioOutputALSA::GetOutputSettings()
{
switch (fmt)
{
- case FORMAT_U8: afmt = SND_PCM_FORMAT_U8; break;
- case FORMAT_S16: afmt = SND_PCM_FORMAT_S16; break;
- case FORMAT_S24: afmt = SND_PCM_FORMAT_S24; break;
- case FORMAT_S32: afmt = SND_PCM_FORMAT_S32; break;
- case FORMAT_FLT: afmt = SND_PCM_FORMAT_FLOAT; break;
+ case FORMAT_U8: afmt = SND_PCM_FORMAT_U8; break;
+ case FORMAT_S16: afmt = SND_PCM_FORMAT_S16; break;
+ case FORMAT_S24LSB: afmt = SND_PCM_FORMAT_S24; break;
+ case FORMAT_S24: afmt = SND_PCM_FORMAT_S32; break;
+ case FORMAT_S32: afmt = SND_PCM_FORMAT_S32; break;
+ case FORMAT_FLT: afmt = SND_PCM_FORMAT_FLOAT; break;
default: continue;
}
if (snd_pcm_hw_params_test_format(pcm_handle, params, afmt) >= 0)
@@ -415,11 +416,12 @@ bool AudioOutputALSA::OpenDevice()
switch (output_format)
{
- case FORMAT_U8: format = SND_PCM_FORMAT_U8; break;
- case FORMAT_S16: format = SND_PCM_FORMAT_S16; break;
- case FORMAT_S24: format = SND_PCM_FORMAT_S24; break;
- case FORMAT_S32: format = SND_PCM_FORMAT_S32; break;
- case FORMAT_FLT: format = SND_PCM_FORMAT_FLOAT; break;
+ case FORMAT_U8: format = SND_PCM_FORMAT_U8; break;
+ case FORMAT_S16: format = SND_PCM_FORMAT_S16; break;
+ case FORMAT_S24LSB: format = SND_PCM_FORMAT_S24; break;
+ case FORMAT_S24: format = SND_PCM_FORMAT_S32; break;
+ case FORMAT_S32: format = SND_PCM_FORMAT_S32; break;
+ case FORMAT_FLT: format = SND_PCM_FORMAT_FLOAT; break;
default:
Error(QString("Unknown sample format: %1").arg(output_format));
return false;
View
2  mythtv/libs/libmyth/audiooutputsettings.cpp
@@ -125,6 +125,8 @@ AudioFormat AudioOutputSettings::GetNextFormat()
void AudioOutputSettings::AddSupportedFormat(AudioFormat format)
{
+ VERBOSE(VB_AUDIO, LOC + QString("Format %1 is supported")
+ .arg(FormatToString(format)));
m_formats.push_back(format);
}
Please sign in to comment.
Something went wrong with that request. Please try again.