kopia lustrzana https://gitlab.com/eliggett/wfview
Merge branch 'audio-enhance'
commit
3be08137dd
|
@ -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<quint16>(in + f);
|
||||
if (enc >= 0)
|
||||
outdata = ulaw_encode[enc];
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
Ładowanie…
Reference in New Issue