fixed #713
This commit is contained in:
@@ -419,5 +419,14 @@ QObject* GetAudioWakeObject()
|
||||
|
||||
void SetAudioWakeObject(QObject *o)
|
||||
{
|
||||
audio_wake_mutex.lock();
|
||||
audio_wake_object = o;
|
||||
audio_wake_mutex.unlock();
|
||||
}
|
||||
|
||||
void WakeAudioWakeObject() {
|
||||
QObject* audio_wake_object = GetAudioWakeObject();
|
||||
if (audio_wake_object != nullptr) {
|
||||
QMetaObject::invokeMethod(audio_wake_object, "play_wake", Qt::QueuedConnection);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -67,6 +67,7 @@ void clear_audio_ibuffer();
|
||||
|
||||
QObject *GetAudioWakeObject();
|
||||
void SetAudioWakeObject(QObject* o);
|
||||
void WakeAudioWakeObject();
|
||||
|
||||
int current_audio_freq();
|
||||
|
||||
|
||||
@@ -461,10 +461,7 @@ void Cacher::CacheAudioWorker() {
|
||||
}
|
||||
|
||||
// If there's a QObject waiting for audio to be rendered, wake it now
|
||||
QObject* audio_wake_object = GetAudioWakeObject();
|
||||
if (audio_wake_object != nullptr) {
|
||||
QMetaObject::invokeMethod(audio_wake_object, "play_wake", Qt::QueuedConnection);
|
||||
}
|
||||
WakeAudioWakeObject();
|
||||
}
|
||||
|
||||
bool Cacher::IsReversed()
|
||||
|
||||
@@ -630,8 +630,8 @@ GLuint olive::rendering::compose_sequence(ComposeSequenceParams ¶ms) {
|
||||
}
|
||||
}
|
||||
|
||||
if (audio_track_count == 0 && params.viewer != nullptr) {
|
||||
params.viewer->play_wake();
|
||||
if (audio_track_count == 0) {
|
||||
WakeAudioWakeObject();
|
||||
}
|
||||
|
||||
if (params.video) {
|
||||
|
||||
Reference in New Issue
Block a user