diff --git a/audiohandler.cpp b/audiohandler.cpp index 9b99d0a..3bd256f 100644 --- a/audiohandler.cpp +++ b/audiohandler.cpp @@ -470,7 +470,7 @@ void audioHandler::incomingAudio(audioPacket inPacket) { for (int g = setup.radioChan; g <= devChannels; g++) { - if (isUlaw) + if (setup.ulaw) *out++ = ulaw_decode[(quint8)inPacket.data[f]] * this->volume; else *out++ = (qint16)(((quint8)inPacket.data[f] << 8) - 32640 * this->volume); @@ -620,7 +620,7 @@ void audioHandler::getNextAudioChunk(QByteArray& ret) for (int f = 0; f < outPacket.length(); f++) { quint8 outdata = 0; - if (isUlaw) { + if (setup.ulaw) { qint16 enc = qFromLittleEndian(in + f); if (enc >= 0) outdata = ulaw_encode[enc]; diff --git a/audiohandler.h b/audiohandler.h index 4e7a3f2..8fc730d 100644 --- a/audiohandler.h +++ b/audiohandler.h @@ -155,9 +155,7 @@ private: #endif SpeexResamplerState* resampler = Q_NULLPTR; - bool isUlaw; quint16 audioLatency; - bool isInput; // Used to determine whether input or output audio unsigned int chunkSize; bool chunkAvailable;