From 06c72f83d79e38b0421fdfe1d4b1bf8f5bf3b9c9 Mon Sep 17 00:00:00 2001 From: Jason Locklin Date: Fri, 31 Jul 2015 10:50:37 -0400 Subject: 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. --- toxav/codec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) { int rc = OPUS_OK; cs->audio_encoder = opus_encoder_create(cs->audio_encoder_sample_rate, - cs->audio_encoder_channels, OPUS_APPLICATION_AUDIO, &rc); + cs->audio_encoder_channels, OPUS_APPLICATION_VOIP, &rc); if ( rc != OPUS_OK ) { LOGGER_ERROR("Error while starting audio encoder: %s", opus_strerror(rc)); -- cgit v1.2.3