isac_constants.h 1.7 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
/*
 constants.h
 Copyright (C) 2013 Belledonne Communications, Grenoble, France

 This program is free software; you can redistribute it and/or
 modify it under the terms of the GNU General Public License
 as published by the Free Software Foundation; either version 2
 of the License, or (at your option) any later version.

 This program is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 GNU General Public License for more details.

 You should have received a copy of the GNU General Public License
 along with this program; if not, write to the Free Software
17
 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
18 19
 */

20 21
#ifndef ISAC_CONSTANTS_H
#define ISAC_CONSTANTS_H
22 23 24 25 26 27 28 29 30 31

/* Define codec specific settings */

#define ISAC_SAMPLE_RATE 16000

/* (10 / 1000) * SAMPLE_RATE, the number of samples to pass at each
 * WebRtcIsacFix_Encode() call */
#define ISAC_SAMPLES_PER_ENCODE 160

typedef enum {
32 33
	ISAC_60MS_SAMPLE_COUNT = 960,
	ISAC_30MS_SAMPLE_COUNT = 480
34 35 36 37
} isac_sample_count_e;

/* This enum is to be used in WebRtcIsacfix_EncoderInit() */
typedef enum {
38 39 40 41 42 43 44 45
	/* In this mode, the bitrate and ptime are adjusted according to statistics
	 * provided by the user through the WebRtcIsacfix_UpdateBwEstimate*()
	 * functions */
	CODING_AUTOMATIC,
	/* Setup the encoder so that bitrate and ptime are controlled by calls to
	 * WebRtcIsacFix_Encode(). This means the user is in charge of evaluating
	 * the correct set of parameters for optimal call quality. */
	CODING_USERDEFINED
46 47 48 49 50
} isac_codingmode_e;

#define ISAC_BITRATE_MAX 32000
#define ISAC_BITRATE_MIN 10000

51
#endif // ISAC_CONSTANTS_H