resuelve glitch cuando no empieza en cero, parece que se queda en alguna
caché intermedia unos frames guardados que no sé flushear...
This commit is contained in:
parent
14ac167dfb
commit
d94f874259
2 changed files with 5 additions and 2 deletions
|
@ -1,7 +1,7 @@
|
|||
#ifndef DEFINES_H
|
||||
#define DEFINES_H
|
||||
|
||||
#define VERSION "LibreMediaServerAudio 0.2.0 Antigona Release"
|
||||
#define VERSION "LibreMediaServerAudio v0.2.0 Antigona"
|
||||
#define COPYRIGHT "(C) 2014-2024 Santi Noreña <lms@criptomart.net>"
|
||||
#define LICENSE "GPL 3 Licensed. See LICENSE.txt."
|
||||
#define DEFAULT_FILE "lms-audio.xlm"
|
||||
|
|
|
@ -376,7 +376,10 @@ ma_result MiniAudioEngine::playbackChanged(int layer, Status status)
|
|||
ma_sound_set_stop_time_in_milliseconds(&m_currentSound[layer], ~(ma_uint64)0);
|
||||
ma_sound_set_looping(&m_currentSound[layer], loop);
|
||||
result = ma_sound_start(&m_currentSound[layer]);
|
||||
//this->volChanged(layer, m_currentLayerValues[layer].vol); // glitch when seek to cursor, how flush the audio buffer?
|
||||
if (m_currentLayerValues[layer].cursor != 0) {
|
||||
usleep(1000 * 50); // Avoid small glitch at start, how to flush the cached buffers in audio pipe line?
|
||||
}
|
||||
this->volChanged(layer, m_currentLayerValues[layer].vol);
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue