[mythtv] AC3 passthrough and timestretch problems
Dan Wilga
mythtv-dev2 at dwilga-linux1.amherst.edu
Tue May 6 13:21:21 UTC 2008
At 8:29 AM -0600 5/5/08, John P Poet wrote:
>On Mon, May 5, 2008 at 7:25 AM, Dan Wilga
><mythtv-dev2 at dwilga-linux1.amherst.edu> wrote:
>> At 6:34 PM -0600 5/2/08, John P Poet wrote:
>> >On Fri, May 2, 2008 at 6:06 PM, John P Poet <jppoet at gmail.com> wrote:
>> >> On Fri, May 2, 2008 at 12:19 AM, Mark Spieth
>><mark at digivation.com.au> wrote:
>> >> > could you also try this one please. this is my prefferred fix.
>> >> > remove the other patch.
>> >> >
>> >> > thanks
>> >> >
>> >> > mark
>> >> >
>> >> > --- audiooutputbase.cpp (revision 17223)
>> >> > +++ audiooutputbase.cpp (working copy)
>> >> > @@ -121,7 +121,8 @@
>> >> > void AudioOutputBase::SetStretchFactorLocked(float
>> >>laudio_stretchfactor)
>> >> > {
>> >> > effdspstretched = (int)((float)effdsp / laudio_stretchfactor);
>> >> > - if (audio_stretchfactor != laudio_stretchfactor)
>> >> > + if ((audio_stretchfactor != laudio_stretchfactor) ||
>> >> > + (pSoundStretch == NULL))
>> >> > {
>> >> > audio_stretchfactor = laudio_stretchfactor;
>> >> > if (pSoundStretch)
>> >>
>> >>
>> >> Yes, that also works.
>> >
>> >Oops. Unfortunately, mythfrontend randomly segfaults with this patch
>> >applied. I will re-test with your original patch.
>>
>> Hm. I also started to get random MFE crashes after applying this
>> patch, but I assumed it was not related. They happen at irregular
>> intervals, one to two minutes after playback starts.
>>
>> Now that I see Mark & Daniel have committed several revisions based
>> on three different issues, I'll try various combinations of them
>> tonight, and try to do a backtrace if there's still a problem.
>> --
>> Dan Wilga "Ook."
>
>
>I don't think Daniel actually committed the fix for my segfaults,
>related to this. Mark figured out that the following is needed:
>
>--- libs/libmyth/audiooutputbase.cpp (revision 17246)
>+++ libs/libmyth/audiooutputbase.cpp (working copy)
>@@ -1040,6 +1045,11 @@
>
> bdiff = kAudioRingBufferSize - amount;
> org_waud += amount;
>+ if (org_waud >= kAudioRingBufferSize)
>+ {
>+ VERBOSE(VB_IMPORTANT, QString("org_waud >=
>kAudioRingBufferSize %1 %2").arg(org_waud).arg(amount));
>+ org_waud -= kAudioRingBufferSize;
>+ }
> }
> }
> else
>@@ -1069,6 +1079,11 @@
> org_waud += nSamples * audio_bytes_per_sample;
> nSamplesToEnd -= nSamples;
> }
>+ if (org_waud >= kAudioRingBufferSize)
>+ {
>+ VERBOSE(VB_IMPORTANT, QString("org_waud >=
>kAudioRingBufferSize %1 %2
>%3").arg(org_waud).arg(nSamples).arg(audio_bytes_per_sample));
>+ org_waud -= kAudioRingBufferSize;
>+ }
>
> newLen += nSamples * audio_bytes_per_sample;
> len -= nSamples * audio_bytes_per_sample;
>
>Are you running TRUNK or FIXES? The above is for TRUNK, but I can
>send you one for FIXES if you need it.
Since I'm still at a pre-Qt4 r16716, the version I applied is the one
for FIXES that you attached to ticket 5283. It looks similar to what
you posted, above. In the limited time I had to test, it did seem to
solve the problem with MFE crashing.
I did not have time to try the other two audio-related patches yet.
--
Dan Wilga "Ook."
More information about the mythtv-dev
mailing list