mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-13 01:24:11 +02:00
Use Q_D instead of d_func
This commit is contained in:
@@ -1244,14 +1244,16 @@ AudioEngine::currentTime() const
|
|||||||
qint64
|
qint64
|
||||||
AudioEngine::currentTrackTotalTime() const
|
AudioEngine::currentTrackTotalTime() const
|
||||||
{
|
{
|
||||||
|
Q_D( const AudioEngine );
|
||||||
|
|
||||||
// FIXME : This is too hacky. The problem is that I don't know why
|
// FIXME : This is too hacky. The problem is that I don't know why
|
||||||
// libVLC doesn't report total duration for stream data (imem://)
|
// libVLC doesn't report total duration for stream data (imem://)
|
||||||
// But it's not a real problem for playback, since EndOfStream is emitted by libVLC itself
|
// But it's not a real problem for playback, since EndOfStream is emitted by libVLC itself
|
||||||
// This value is only used by AudioOutput to evaluate if it's close to end of stream
|
// This value is only used by AudioOutput to evaluate if it's close to end of stream
|
||||||
if ( d_func()->audioOutput->totalTime() <= 0 && d_func()->currentTrack && d_func()->currentTrack->track() ) {
|
if ( d->audioOutput->totalTime() <= 0 && d->currentTrack && d->currentTrack->track() ) {
|
||||||
return d_func()->currentTrack->track()->duration() * 1000 + 1000;
|
return d->currentTrack->track()->duration() * 1000 + 1000;
|
||||||
}
|
}
|
||||||
return d_func()->audioOutput->totalTime();
|
return d->audioOutput->totalTime();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user