diff --git a/src/defines.h b/src/defines.h index 68c72f5..23d3322 100644 --- a/src/defines.h +++ b/src/defines.h @@ -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 " #define LICENSE "GPL 3 Licensed. See LICENSE.txt." #define DEFAULT_FILE "lms-audio.xlm" diff --git a/src/miniaudioengine.cpp b/src/miniaudioengine.cpp index 9dbd3c8..6bdeb2d 100644 --- a/src/miniaudioengine.cpp +++ b/src/miniaudioengine.cpp @@ -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; }