diff --git a/src/networkAudioStream.cpp b/src/networkAudioStream.cpp index dfe2f26..9f2d07c 100644 --- a/src/networkAudioStream.cpp +++ b/src/networkAudioStream.cpp @@ -13,7 +13,7 @@ NetworkAudioStream::NetworkAudioStream() samples.reserve(sample_rate * 10); int error = 0; - decoder = opus_decoder_create(sample_rate, 1, &error); + decoder = opus_decoder_create(48000, 1, &error); } void NetworkAudioStream::onMixSamples(int16_t* stream, int sample_count) diff --git a/src/networkRecorder.cpp b/src/networkRecorder.cpp index f3632aa..aab3339 100644 --- a/src/networkRecorder.cpp +++ b/src/networkRecorder.cpp @@ -101,7 +101,7 @@ void NetworkAudioRecorder::update(float /*delta*/) void NetworkAudioRecorder::startSending() { int error = 0; - encoder = opus_encoder_create(44100, 1, OPUS_APPLICATION_VOIP, &error); + encoder = opus_encoder_create(48000, 1, OPUS_APPLICATION_VOIP, &error); if (!encoder) { LOG(ERROR) << "Failed to create opus encoder:" << error;