Skip to content

Commit 4a01057

Browse files
committed
Fix timestretch when using Playback Group.
If timestretch was specified in a given Playback Group, it wouldn't be effective
1 parent 23329ec commit 4a01057

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

mythtv/libs/libmythtv/audioplayer.cpp

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,6 @@ QString AudioPlayer::ReinitAudio(void)
8989
m_codec_profile);
9090
m_audioOutput->Reconfigure(settings);
9191
errMsg = m_audioOutput->GetError();
92-
SetStretchFactor(m_stretchfactor);
9392
}
9493

9594
if (!errMsg.isEmpty())
@@ -106,6 +105,11 @@ QString AudioPlayer::ReinitAudio(void)
106105
VERBOSE(VB_IMPORTANT, LOC + "Enabling Audio");
107106
m_no_audio_out = false;
108107
}
108+
if (!m_no_audio_in && !m_no_audio_out && m_audioOutput)
109+
{
110+
SetStretchFactor(m_stretchfactor);
111+
}
112+
109113
if (m_muted_on_creation)
110114
{
111115
SetMuteState(kMuteAll);
@@ -287,9 +291,9 @@ bool AudioPlayer::ToggleUpmix(void)
287291

288292
void AudioPlayer::SetStretchFactor(float factor)
289293
{
294+
m_stretchfactor = factor;
290295
if (!m_audioOutput)
291296
return;
292-
m_stretchfactor = factor;
293297
QMutexLocker lock(&m_lock);
294298
m_audioOutput->SetStretchFactor(m_stretchfactor);
295299
}

0 commit comments

Comments
 (0)