summaryrefslogtreecommitdiff
path: root/toxav/audio.c
diff options
context:
space:
mode:
Diffstat (limited to 'toxav/audio.c')
-rw-r--r--toxav/audio.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/toxav/audio.c b/toxav/audio.c
index b936f7a4..da1ea11f 100644
--- a/toxav/audio.c
+++ b/toxav/audio.c
@@ -355,7 +355,8 @@ static struct RTPMessage *jbuf_read(struct JitterBuffer *q, int32_t *success)
355 *success = 0; 355 *success = 0;
356 return nullptr; 356 return nullptr;
357} 357}
358OpusEncoder *create_audio_encoder(const Logger *log, int32_t bit_rate, int32_t sampling_rate, int32_t channel_count) 358static OpusEncoder *create_audio_encoder(const Logger *log, int32_t bit_rate, int32_t sampling_rate,
359 int32_t channel_count)
359{ 360{
360 int status = OPUS_OK; 361 int status = OPUS_OK;
361 /* 362 /*
@@ -448,8 +449,8 @@ FAILURE:
448 return nullptr; 449 return nullptr;
449} 450}
450 451
451bool reconfigure_audio_encoder(const Logger *log, OpusEncoder **e, int32_t new_br, int32_t new_sr, uint8_t new_ch, 452static bool reconfigure_audio_encoder(const Logger *log, OpusEncoder **e, int32_t new_br, int32_t new_sr,
452 int32_t *old_br, int32_t *old_sr, int32_t *old_ch) 453 uint8_t new_ch, int32_t *old_br, int32_t *old_sr, int32_t *old_ch)
453{ 454{
454 /* Values are checked in toxav.c */ 455 /* Values are checked in toxav.c */
455 if (*old_sr != new_sr || *old_ch != new_ch) { 456 if (*old_sr != new_sr || *old_ch != new_ch) {
@@ -480,7 +481,7 @@ bool reconfigure_audio_encoder(const Logger *log, OpusEncoder **e, int32_t new_b
480 return true; 481 return true;
481} 482}
482 483
483bool reconfigure_audio_decoder(ACSession *ac, int32_t sampling_rate, int8_t channels) 484static bool reconfigure_audio_decoder(ACSession *ac, int32_t sampling_rate, int8_t channels)
484{ 485{
485 if (sampling_rate != ac->ld_sample_rate || channels != ac->ld_channel_count) { 486 if (sampling_rate != ac->ld_sample_rate || channels != ac->ld_channel_count) {
486 if (current_time_monotonic(ac->mono_time) - ac->ldrts < 500) { 487 if (current_time_monotonic(ac->mono_time) - ac->ldrts < 500) {