Skip to content

Commit

Permalink
Recalculate the audio time stamp even when the audiooutput has no vis…
Browse files Browse the repository at this point in the history
…ual attached.

This fixes a bug introduced in 0affac2f96c903
were MythMusic wasn't updating the time on the playback screen after returning to it.
  • Loading branch information
Paul Harrison committed Jul 27, 2011
1 parent 9649c3c commit dc4e316
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions mythtv/libs/libmyth/audio/audiooutputbase.cpp
Expand Up @@ -1277,15 +1277,16 @@ bool AudioOutputBase::AddData(void *in_buffer, int in_len,
.arg(needs_upmix));

// Mythmusic doesn't give us timestamps
if (timecode < 0)
{
// Send original samples to mythmusic visualisation
timecode = (frames_buffered * 1000) / source_samplerate;
frames_buffered += frames;
music = true;
}

if (hasVisual())
{
if (timecode < 0)
{
// Send original samples to mythmusic visualisation
timecode = (frames_buffered * 1000) / source_samplerate;
frames_buffered += frames;
music = true;
}
dispatchVisual((uchar *)in_buffer, len, timecode, source_channels,
output_settings->FormatToBits(format));
}
Expand Down

0 comments on commit dc4e316

Please sign in to comment.