From 285662652398b0965361909870062ff999f1adae Mon Sep 17 00:00:00 2001 From: Volker Fischer Date: Sun, 9 Jun 2013 06:42:33 +0000 Subject: [PATCH] added formula --- src/client.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/client.h b/src/client.h index acb8806a..a80f17db 100755 --- a/src/client.h +++ b/src/client.h @@ -82,6 +82,13 @@ // are used in the OPUS decoder (which gives a bad noise output signal). // Later on when the CELT is completely removed we could set the OPUS // numbers back to the original CELT values (to reduce network load) + +// calculation to get from the number of bytes to the code rate in bps: +// rate [pbs] = Fs / L * N * 8, where +// Fs: sampling rate (SYSTEM_SAMPLE_RATE_HZ) +// L: number of samples per packet (SYSTEM_FRAME_SIZE_SAMPLES) +// N: number of bytes per packet (values below) + #define OPUS_NUM_BYTES_MONO_NORMAL_QUALITY 25 #define OPUS_NUM_BYTES_MONO_HIGH_QUALITY 45 #define OPUS_NUM_BYTES_STEREO_NORMAL_QUALITY 47