[mythtv-commits] Ticket #7784: WriteAudio: buffer underrun during playback of CD audio

MythTV mythtv at cvs.mythtv.org
Mon Jan 4 10:40:58 UTC 2010


#7784: WriteAudio: buffer underrun during  playback of CD audio
--------------------------------------------+-------------------------------
 Reporter:  Paul <paul@…>                   |        Owner:  jyavenard 
     Type:  defect                          |       Status:  closed    
 Priority:  minor                           |    Milestone:  unknown   
Component:  MythTV - Audio Output           |      Version:  0.22-fixes
 Severity:  medium                          |   Resolution:  worksforme
  Mlocked:  0                               |  
--------------------------------------------+-------------------------------

Comment(by otto at kolsi dot fi):

 I'm seeing something similar here. Hasn't bothered me since I'm not
 listening CDs, but I've noticed that the issue exists.

 [20820] shortened audio buffering in MythMusic. As a very quick test, I
 bumped the CD buffering from 500ms -> 2000ms and this fixed the issue for
 me. Of course the 2sec buffer might be too much but maybe 500ms is too
 short also for some.

 With the one machine I tested this, listening 1 minute of CD resulted 6-10
 short pauses and buffer underruns. With the increased buffering the
 playback is fine.

 Paul, if you are able to test patches, you could try something like this:
 {{{
 Index: mythmusic/mythmusic/cddecoder.cpp
 ===================================================================
 --- mythmusic/mythmusic/cddecoder.cpp   (revision 23071)
 +++ mythmusic/mythmusic/cddecoder.cpp   (working copy)
 @@ -85,7 +85,7 @@
              // Never buffer more than 500ms of audio since this slows
 down
              // actions such as seeking or track changes made after
 decoding is
              // complete but audio remains in the buffer
 -            bool ok = (output()->GetAudioBufferedTime() <= 500);
 +            bool ok = (output()->GetAudioBufferedTime() <= 2000);
              if (ok) ok = output()->AddSamples(output_buf, samples, -1);
              if (ok)
              {
 }}}

-- 
Ticket URL: <http://svn.mythtv.org/trac/ticket/7784#comment:6>
MythTV <http://www.mythtv.org/>
MythTV


More information about the mythtv-commits mailing list