mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2026-07-28 00:12:26 +00:00
Fix song / voice playback.
This commit is contained in:
@@ -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) {
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user