Fix song / voice playback.

This commit is contained in:
John Preston 2019-03-26 15:23:35 +04:00
parent 3bd1bbc77a
commit e87084715d
2 changed files with 3 additions and 8 deletions

View File

@ -803,9 +803,7 @@ void Mixer::play(
emit loaderOnCancel(current->state.id);
emit faderOnTimer();
}
if (type == AudioMsgId::Type::Video) {
current->clear();
} else {
if (type != AudioMsgId::Type::Video) {
auto foundCurrent = currentIndex(type);
auto index = 0;
for (; index != kTogetherLimit; ++index) {
@ -821,10 +819,8 @@ void Mixer::play(
}
}
if (current->state.id != audio) {
current->started(); // Clear all previous state.
current->state.id = audio;
}
current->clear(); // Clear all previous state.
current->state.id = audio;
current->lastUpdateWhen = 0;
current->lastUpdatePosition = 0;
if (externalData) {

View File

@ -597,7 +597,6 @@ void Instance::emitUpdate(AudioMsgId::Type type, CheckCallback check) {
}
setCurrent(state.id);
if (data->streamed && !data->streamed->info.video.size.isEmpty()) {
LOG(("ID: %1, PROGRESS: %1 / %2").arg(state.id.audio()->id).arg(state.position).arg(state.length));
data->streamed->progress.updateState(state);
}
_updatedNotifier.notify(state, true);