From 3cf0b044d7bab38cd7705352dcc7e4c789ce364a Mon Sep 17 00:00:00 2001 From: f4exb Date: Mon, 26 Dec 2016 11:16:12 +0100 Subject: [PATCH] Fixed audio FIFO read length --- plugins/channeltx/modam/ammod.cpp | 2 +- plugins/channeltx/modnfm/nfmmod.cpp | 2 +- plugins/channeltx/modssb/ssbmod.cpp | 2 +- plugins/channeltx/modwfm/wfmmod.cpp | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/plugins/channeltx/modam/ammod.cpp b/plugins/channeltx/modam/ammod.cpp index d177ad556..d6507887f 100644 --- a/plugins/channeltx/modam/ammod.cpp +++ b/plugins/channeltx/modam/ammod.cpp @@ -146,7 +146,7 @@ void AMMod::pullAudio(int nbSamples) m_audioBuffer.resize(nbAudioSamples); } - m_audioFifo.read(reinterpret_cast(&m_audioBuffer[0]), nbAudioSamples*sizeof(AudioSample), 10); + m_audioFifo.read(reinterpret_cast(&m_audioBuffer[0]), nbAudioSamples, 10); m_audioBufferFill = 0; } diff --git a/plugins/channeltx/modnfm/nfmmod.cpp b/plugins/channeltx/modnfm/nfmmod.cpp index 05c288665..c7802ab0b 100644 --- a/plugins/channeltx/modnfm/nfmmod.cpp +++ b/plugins/channeltx/modnfm/nfmmod.cpp @@ -160,7 +160,7 @@ void NFMMod::pullAudio(int nbSamples) m_audioBuffer.resize(nbSamplesAudio); } - m_audioFifo.read(reinterpret_cast(&m_audioBuffer[0]), nbSamplesAudio*sizeof(AudioSample), 10); + m_audioFifo.read(reinterpret_cast(&m_audioBuffer[0]), nbSamplesAudio, 10); m_audioBufferFill = 0; } diff --git a/plugins/channeltx/modssb/ssbmod.cpp b/plugins/channeltx/modssb/ssbmod.cpp index 19b50504c..07edf468a 100644 --- a/plugins/channeltx/modssb/ssbmod.cpp +++ b/plugins/channeltx/modssb/ssbmod.cpp @@ -191,7 +191,7 @@ void SSBMod::pullAudio(int nbSamples) m_audioBuffer.resize(nbSamplesAudio); } - m_audioFifo.read(reinterpret_cast(&m_audioBuffer[0]), nbSamplesAudio*sizeof(AudioSample), 10); + m_audioFifo.read(reinterpret_cast(&m_audioBuffer[0]), nbSamplesAudio, 10); m_audioBufferFill = 0; } diff --git a/plugins/channeltx/modwfm/wfmmod.cpp b/plugins/channeltx/modwfm/wfmmod.cpp index 814df9a29..1a6bcb572 100644 --- a/plugins/channeltx/modwfm/wfmmod.cpp +++ b/plugins/channeltx/modwfm/wfmmod.cpp @@ -149,7 +149,7 @@ void WFMMod::pullAudio(int nbSamples) m_audioBuffer.resize(nbSamplesAudio); } - m_audioFifo.read(reinterpret_cast(&m_audioBuffer[0]), nbSamplesAudio*sizeof(AudioSample), 10); + m_audioFifo.read(reinterpret_cast(&m_audioBuffer[0]), nbSamplesAudio, 10); m_audioBufferFill = 0; }