Index: libs/libmyth/audiooutputbase.h =================================================================== RCS file: /var/lib/mythcvs/mythtv/libs/libmyth/audiooutputbase.h,v retrieving revision 1.3 diff -a -u -r1.3 audiooutputbase.h --- libs/libmyth/audiooutputbase.h 13 Nov 2004 22:29:44 -0000 1.3 +++ libs/libmyth/audiooutputbase.h 26 Dec 2004 01:09:57 -0000 @@ -77,6 +77,8 @@ void UpdateVolume(void); + void SetStretchFactorLocked(float factor); + int effdsp; // from the recorded stream int effdspstretched; // from the recorded stream Index: libs/libmyth/audiooutputbase.cpp =================================================================== RCS file: /var/lib/mythcvs/mythtv/libs/libmyth/audiooutputbase.cpp,v retrieving revision 1.6 diff -a -u -r1.6 audiooutputbase.cpp --- libs/libmyth/audiooutputbase.cpp 24 Dec 2004 23:37:45 -0000 1.6 +++ libs/libmyth/audiooutputbase.cpp 26 Dec 2004 01:09:58 -0000 @@ -48,7 +48,7 @@ pthread_cond_destroy(&audio_bufsig); } -void AudioOutputBase::SetStretchFactor(float laudio_stretchfactor) +void AudioOutputBase::SetStretchFactorLocked(float laudio_stretchfactor) { effdspstretched = (int)((float)effdsp / laudio_stretchfactor); if (audio_stretchfactor != laudio_stretchfactor) @@ -79,6 +79,13 @@ } } +void AudioOutputBase::SetStretchFactor(float laudio_stretchfactor) +{ + pthread_mutex_lock(&audio_buflock); + SetStretchFactorLocked(laudio_stretchfactor); + pthread_mutex_unlock(&audio_buflock); +} + void AudioOutputBase::Reconfigure(int laudio_bits, int laudio_channels, int laudio_samplerate) { @@ -158,7 +165,7 @@ need_resampler = true; } - SetStretchFactor(audio_stretchfactor); + SetStretchFactorLocked(audio_stretchfactor); if (pSoundStretch) { pSoundStretch->setSampleRate(audio_samplerate);