summaryrefslogtreecommitdiff
path: root/toxav/codec.c
diff options
context:
space:
mode:
authorJason Locklin <jalockli@uwaterloo.ca>2015-07-31 10:50:37 -0400
committerJason Locklin <jalockli@uwaterloo.ca>2015-07-31 10:50:37 -0400
commit06c72f83d79e38b0421fdfe1d4b1bf8f5bf3b9c9 (patch)
treec8e2f7b08bfeca177649ccd4349d184855e7d141 /toxav/codec.c
parent5def57afcf0413f3eee92f29aeef0153db5d2e0c (diff)
OPUS_APPLICATION_VOIP should be used
See: http://opus-codec.org/docs/html_api-1.0.1/group__opus__encoder.html#gaa89264fd93c9da70362a0c9b96b9ca88 "VOIP" rather than "AUDIO": > gives best quality at a given bitrate for voice signals. It enhances the input signal by high-pass filtering and emphasizing formants and harmonics. Optionally it includes in-band forward error correction to protect against packet loss. Use this mode for typical VoIP applications.
Diffstat (limited to 'toxav/codec.c')
-rw-r--r--toxav/codec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/toxav/codec.c b/toxav/codec.c
index ae146ccf..71d24e87 100644
--- a/toxav/codec.c
+++ b/toxav/codec.c
@@ -294,7 +294,7 @@ static int init_audio_encoder(CSSession *cs)
294{ 294{
295 int rc = OPUS_OK; 295 int rc = OPUS_OK;
296 cs->audio_encoder = opus_encoder_create(cs->audio_encoder_sample_rate, 296 cs->audio_encoder = opus_encoder_create(cs->audio_encoder_sample_rate,
297 cs->audio_encoder_channels, OPUS_APPLICATION_AUDIO, &rc); 297 cs->audio_encoder_channels, OPUS_APPLICATION_VOIP, &rc);
298 298
299 if ( rc != OPUS_OK ) { 299 if ( rc != OPUS_OK ) {
300 LOGGER_ERROR("Error while starting audio encoder: %s", opus_strerror(rc)); 300 LOGGER_ERROR("Error while starting audio encoder: %s", opus_strerror(rc));