diff --git a/plugins/opusCodec/CMakeLists.txt b/plugins/opusCodec/CMakeLists.txt index 06ed6eab95..583aff85d6 100644 --- a/plugins/opusCodec/CMakeLists.txt +++ b/plugins/opusCodec/CMakeLists.txt @@ -12,5 +12,5 @@ link_hifi_libraries(shared audio plugins) target_opus() if (BUILD_SERVER) - install_beside_console() + install_beside_console() endif () diff --git a/plugins/opusCodec/src/OpusDecoder.h b/plugins/opusCodec/src/OpusDecoder.h index f7ae6eb6da..095893856b 100644 --- a/plugins/opusCodec/src/OpusDecoder.h +++ b/plugins/opusCodec/src/OpusDecoder.h @@ -29,7 +29,7 @@ public: private: int _encodedSize; - OpusDecoder *_decoder = nullptr; + OpusDecoder* _decoder = nullptr; int _opusSampleRate = 0; int _opusNumChannels = 0; int _decodedSize = 0; diff --git a/plugins/opusCodec/src/OpusEncoder.cpp b/plugins/opusCodec/src/OpusEncoder.cpp index e0b20a6e65..124ca3e3e1 100644 --- a/plugins/opusCodec/src/OpusEncoder.cpp +++ b/plugins/opusCodec/src/OpusEncoder.cpp @@ -41,7 +41,7 @@ static QString errorToString(int error) { AthenaOpusEncoder::AthenaOpusEncoder(int sampleRate, int numChannels) { _opusSampleRate = sampleRate; - _opusChannels = numChannels; + _opusChannels = numChannels; int error; @@ -72,8 +72,8 @@ void AthenaOpusEncoder::encode(const QByteArray& decodedBuffer, QByteArray& enco PerformanceTimer perfTimer("AthenaOpusEncoder::encode"); assert(_encoder); - encodedBuffer.resize( decodedBuffer.size() ); - int frameSize = decodedBuffer.length()/ _opusChannels / static_cast(sizeof(opus_int16)); + encodedBuffer.resize(decodedBuffer.size()); + int frameSize = decodedBuffer.length() / _opusChannels / static_cast(sizeof(opus_int16)); int bytes = opus_encode(_encoder, reinterpret_cast(decodedBuffer.constData()), frameSize, reinterpret_cast(encodedBuffer.data()), encodedBuffer.size() ); @@ -231,28 +231,28 @@ int AthenaOpusEncoder::getInbandFEC() const { return fec; } -void AthenaOpusEncoder::setInbandFEC(int fec) { +void AthenaOpusEncoder::setInbandFEC(int inBandFEC) { assert(_encoder); - int errorCode = opus_encoder_ctl(_encoder, OPUS_SET_INBAND_FEC(fec)); + int errorCode = opus_encoder_ctl(_encoder, OPUS_SET_INBAND_FEC(inBandFEC)); if (errorCode != OPUS_OK) { - qCWarning(encoder) << "Error when setting inband FEC to " << fec << ": " << errorToString(errorCode); + qCWarning(encoder) << "Error when setting inband FEC to " << inBandFEC << ": " << errorToString(errorCode); } } -int AthenaOpusEncoder::getExpectedPacketLossPercent() const { +int AthenaOpusEncoder::getExpectedPacketLossPercentage() const { assert(_encoder); int lossPercentage; opus_encoder_ctl(_encoder, OPUS_GET_PACKET_LOSS_PERC(&lossPercentage)); return lossPercentage; } -void AthenaOpusEncoder::setExpectedPacketLossPercentage(int percent) { +void AthenaOpusEncoder::setExpectedPacketLossPercentage(int percentage) { assert(_encoder); - int errorCode = opus_encoder_ctl(_encoder, OPUS_SET_PACKET_LOSS_PERC(percent)); + int errorCode = opus_encoder_ctl(_encoder, OPUS_SET_PACKET_LOSS_PERC(percentage)); if (errorCode != OPUS_OK) { - qCWarning(encoder) << "Error when setting loss percent to " << percent << ": " << errorToString(errorCode); + qCWarning(encoder) << "Error when setting loss percent to " << percentage << ": " << errorToString(errorCode); } } @@ -270,4 +270,4 @@ void AthenaOpusEncoder::setDTX(int dtx) { if (errorCode != OPUS_OK) { qCWarning(encoder) << "Error when setting DTX to " << dtx << ": " << errorToString(errorCode); } -} \ No newline at end of file +} diff --git a/plugins/opusCodec/src/OpusEncoder.h b/plugins/opusCodec/src/OpusEncoder.h index fc1ca0b827..107b0f82ca 100644 --- a/plugins/opusCodec/src/OpusEncoder.h +++ b/plugins/opusCodec/src/OpusEncoder.h @@ -38,27 +38,27 @@ public: void setVBR(int vbr); int getVBRConstraint() const; - void setVBRConstraint(int vbr_const); + void setVBRConstraint(int vbrConstraint); int getMaxBandwidth() const; - void setMaxBandwidth(int maxbw); + void setMaxBandwidth(int maxBandwidth); int getBandwidth() const; - void setBandwidth(int bw); + void setBandwidth(int bandwidth); int getSignal() const; void setSignal(int signal); int getApplication() const; - void setApplication(int app); + void setApplication(int application); int getLookahead() const; int getInbandFEC() const; - void setInbandFEC(int fec); + void setInbandFEC(int inBandFEC); - int getExpectedPacketLossPercent() const; - void setExpectedPacketLossPercentage(int percent); + int getExpectedPacketLossPercentage() const; + void setExpectedPacketLossPercentage(int percentage); int getDTX() const; void setDTX(int dtx);