|
|
|
|
@ -968,7 +968,7 @@ void MainWindow::autoPlayCheckNewMessage(const QString& channelId) {
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void MainWindow::autoPlayTimerTick() { |
|
|
|
|
if (SoundManager::instance()->isCurrentPcmPlaying()) |
|
|
|
|
if (VoicePlayer::isPreparing() || SoundManager::instance()->isCurrentPcmPlaying()) |
|
|
|
|
return; |
|
|
|
|
|
|
|
|
|
while (!m_autoPlayQueue.isEmpty()) { |
|
|
|
|
@ -996,8 +996,9 @@ void MainWindow::autoPlayTimerTick() {
|
|
|
|
|
DEBUG_DEBUG(DEBUG_CATEGORY_DEBUG, "auto-play: playing ch=%s msg=%lld file=%s dur=%.1fs", |
|
|
|
|
qPrintable(chId), (long long)msgId, qPrintable(fullPath), (double)dur); |
|
|
|
|
MessageDelegate::stopAllAutoPlay(); |
|
|
|
|
float actualDur = VoicePlayer::playOpusFile(fullPath); |
|
|
|
|
MessageDelegate::startAutoPlay(fullPath, actualDur); |
|
|
|
|
VoicePlayer::playOpusFile(fullPath, this, [fullPath](float actualDur) { |
|
|
|
|
MessageDelegate::startAutoPlay(fullPath, actualDur); |
|
|
|
|
}); |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|