Skip to content

Commit

Permalink
janus: reduces opus frame length to 20ms
Browse files Browse the repository at this point in the history
  • Loading branch information
mdevaev committed Dec 26, 2024
1 parent 04114bb commit 481e359
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion janus/src/audio.c
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@

// A number of frames per 1 channel:
// - https://github.com/xiph/opus/blob/7b05f44/src/opus_demo.c#L368
#define _HZ_TO_FRAMES(_hz) (6 * (_hz) / 50) // 120ms
// #define _HZ_TO_FRAMES(_hz) (6 * (_hz) / 50) // 120ms
#define _HZ_TO_FRAMES(_hz) ((_hz) / 50) // 20ms
#define _HZ_TO_BUF16(_hz) (_HZ_TO_FRAMES(_hz) * 2) // One stereo frame = (16bit L) + (16bit R)
#define _HZ_TO_BUF8(_hz) (_HZ_TO_BUF16(_hz) * sizeof(s16))

Expand Down

0 comments on commit 481e359

Please sign in to comment.