Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

libmyth: Fix/enable visualisations for non mythmusic sources.

  • Loading branch information...
commit 0affac2f96c9030e185bb919c2920450712344fe 1 parent 6c7a2ea
Mark Kendall authored
View
13 mythtv/libs/libmyth/audio/audiooutputbase.cpp
@@ -1292,14 +1292,17 @@ bool AudioOutputBase::AddData(void *in_buffer, int in_len,
QMutexLocker lock(&audio_buflock);
// Mythmusic doesn't give us timestamps
- if (timecode < 0)
+ if (hasVisual())
{
- // Send original samples to mythmusic visualisation
- timecode = (frames_buffered * 1000) / source_samplerate;
- frames_buffered += frames;
+ 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));
- music = true;
}
// Calculate amount of free space required in ringbuffer
View
1  mythtv/libs/libmyth/output.h
@@ -102,6 +102,7 @@ class MPUBLIC OutputListeners : public MythObservable
OutputListeners();
virtual ~OutputListeners();
+ bool hasVisual(void) { return visuals.size(); }
void addVisual(MythTV::Visual *);
void removeVisual(MythTV::Visual *);
Please sign in to comment.
Something went wrong with that request. Please try again.