1 /*********************************************************************** 2 Copyright (c) 2006-2010, Skype Limited. All rights reserved. 3 Redistribution and use in source and binary forms, with or without 4 modification, (subject to the limitations in the disclaimer below) 5 are permitted provided that the following conditions are met: 6 - Redistributions of source code must retain the above copyright notice, 7 this list of conditions and the following disclaimer. 8 - Redistributions in binary form must reproduce the above copyright 9 notice, this list of conditions and the following disclaimer in the 10 documentation and/or other materials provided with the distribution. 11 - Neither the name of Skype Limited, nor the names of specific 12 contributors, may be used to endorse or promote products derived from 13 this software without specific prior written permission. 14 NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE GRANTED 15 BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND 16 CONTRIBUTORS ''AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, 17 BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 18 FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 19 COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 20 INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 21 NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF 22 USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON 23 ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 25 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 ***********************************************************************/ 27 28 #ifndef SKP_SILK_CONTROL_H 29 #define SKP_SILK_CONTROL_H 30 31 #include "SKP_Silk_typedef.h" 32 33 #ifdef __cplusplus 34 extern "C" 35 { 36 #endif 37 38 /***********************************************/ 39 /* Structure for controlling encoder operation */ 40 /***********************************************/ 41 typedef struct { 42 /* I: Sampling rate in Hertz; 8000/12000/16000/24000 */ 43 SKP_int32 sampleRate; 44 45 /* I: Number of samples per packet; must be equivalent of 20, 40, 60, 80 or 100 ms */ 46 SKP_int packetSize; 47 48 /* I: Bitrate during active speech in bits/second; internally limited */ 49 SKP_int32 bitRate; 50 51 /* I: Uplink Packet loss in pct (0...100) */ 52 SKP_int packetLossPercentage; 53 54 /* I: Complexity mode; 0 is lowest; 1 is medium and 2 is highest complexity */ 55 SKP_int complexity; 56 57 /* I: Flag to enable in-band Forward Error Correction (FEC); 0/1 */ 58 SKP_int useInBandFEC; 59 60 /* I: Flag to enable Discontinous Transmission; 0/1 */ 61 SKP_int useDTX; 62 } SKP_SILK_SDK_EncControlStruct; 63 64 /**************************************************************************/ 65 /* Structure for controlling decoder operation and reading decoder status */ 66 /**************************************************************************/ 67 typedef struct { 68 /* I: Sampling rate in Hertz; 8000/12000/16000/24000 */ 69 SKP_int32 sampleRate; 70 71 /* O: Number of samples per frame */ 72 SKP_int frameSize; 73 74 /* O: Frames per packet 1, 2, 3, 4, 5 */ 75 SKP_int framesPerPacket; 76 77 /* O: Flag to indicate that the decoder has remaining payloads internally */ 78 SKP_int moreInternalDecoderFrames; 79 80 /* O: Distance between main payload and redundant payload in packets */ 81 SKP_int inBandFECOffset; 82 } SKP_SILK_SDK_DecControlStruct; 83 84 #ifdef __cplusplus 85 } 86 #endif 87 88 #endif 89