feat: voice playback delay compensation + waveform click-to-seek
This commit is contained in:
1 parent
da953c6c7a
commit
6b765de5cc
3 files changed
+60
-9
No files matched your search
@@ -153,6 +153,7 @@ void SoundManager::playRawPcm(const int16_t* pcm, int sampleCount, int sampleRat
|
||||
return;
|
||||
}
|
||||
if (m_currentPcmSound) ma_sound_stop(m_currentPcmSound);
|
||||
m_currentPcmSampleRate = sampleRate;
|
||||
DEBUG_DEBUG(DEBUG_CATEGORY_DEBUG, "SoundManager::playRawPcm: %d samples %dHz %dch", sampleCount, sampleRate, channels);
|
||||
|
||||
ma_audio_buffer_config bufCfg = ma_audio_buffer_config_init(
|
||||
@@ -189,6 +190,11 @@ void SoundManager::resumeCurrentPcm() {
|
||||
|
||||
void SoundManager::stopCurrentPcm() {
|
||||
if (m_currentPcmSound) ma_sound_stop(m_currentPcmSound);
|
||||
m_currentPcmSampleRate = 0;
|
||||
}
|
||||
|
||||
void SoundManager::seekCurrentPcm(unsigned long long pcmFrame) {
|
||||
if (m_currentPcmSound) ma_sound_seek_to_pcm_frame(m_currentPcmSound, pcmFrame);
|
||||
}
|
||||
|
||||
static QString decodeDeviceName(const char* name) {
|
||||
|
||||
Reference in new issue
Block a user