Skip to content

Commit

Permalink
Use supported opus encoder rate
Browse files Browse the repository at this point in the history
  • Loading branch information
daid committed Apr 29, 2024
1 parent 19f0827 commit d623512
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/networkAudioStream.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion src/networkRecorder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

1 comment on commit d623512

@daid-tinyci
Copy link

@daid-tinyci daid-tinyci bot commented on d623512 Apr 29, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TinyCI build failure:

[make -j 2] returned [2]:


[  1%] Built target glad

[ 11%] Built target lua

[ 27%] Built target box2d

[ 34%] Built target basisu-encoder

[ 80%] Built target opus

[ 80%] Generating glDebug.inl

-- GLAD header: /data/tinyci_build/daid/SeriousProton/libs/glad/glad/glad.h

-- GlDebug.inl output: /data/tinyci_build/daid/SeriousProton/_build_native/include/graphics/glDebug.inl

[ 80%] Building CXX object CMakeFiles/seriousproton_objects.dir/src/collisionable.cpp.o

[ 80%] Building CXX object CMakeFiles/seriousproton_objects.dir/src/engine.cpp.o

[ 80%] Building CXX object CMakeFiles/seriousproton_objects.dir/src/graphics/freetypefont.cpp.o

/data/tinyci_build/daid/SeriousProton/src/graphics/freetypefont.cpp:8:10: fatal error: ft2build.h: No such file or directory

    8 | #include <ft2build.h>

      |          ^~~~~~~~~~~~

compilation terminated.

make[2]: *** [CMakeFiles/seriousproton_objects.dir/build.make:194: CMakeFiles/seriousproton_objects.dir/src/graphics/freetypefont.cpp.o] Error 1

make[2]: *** Waiting for unfinished jobs....

make[1]: *** [CMakeFiles/Makefile2:209: CMakeFiles/seriousproton_objects.dir/all] Error 2

make: *** [Makefile:136: all] Error 2

Please sign in to comment.