Browse code

opus: b/f: support only 1 channel, less debug log

Stefan Sayer authored on 24/07/2014 19:43:52
Showing 1 changed files
... ...
@@ -109,7 +109,7 @@ BEGIN_EXPORTS( "opus" , AMCI_NO_MODULEINIT, AMCI_NO_MODULEDESTROY )
109 109
   END_CODECS
110 110
     
111 111
   BEGIN_PAYLOADS
112
-    PAYLOAD( -1, "opus", _OPUS_RATE, 48000, 2, CODEC_OPUS, AMCI_PT_AUDIO_FRAME )
112
+    PAYLOAD( -1, "opus", _OPUS_RATE, 48000, 1, CODEC_OPUS, AMCI_PT_AUDIO_FRAME )
113 113
   END_PAYLOADS
114 114
 
115 115
   BEGIN_FILE_FORMATS
... ...
@@ -190,7 +190,7 @@ int pcm16_2_opus( unsigned char* out_buf, unsigned char* in_buf, unsigned int si
190 190
   res = opus_encode(codec_inst->opus_enc, (opus_int16*)in_buf, size/2/channels, out_buf, AUDIO_BUFFER_SIZE);
191 191
   /* returns bytes in encoded frame */
192 192
 
193
-  DBG ("OPUS encode: size: %d, chan: %d, rate: %d, result %d.\n", size, channels, rate, res);
193
+  /* DBG ("OPUS encode: size: %d, chan: %d, rate: %d, result %d.\n", size, channels, rate, res); */
194 194
   return res;
195 195
 }
196 196
 
... ...
@@ -211,7 +211,7 @@ static int opus_2_pcm16( unsigned char* out_buf, unsigned char* in_buf, unsigned
211 211
     res*=2;
212 212
   }
213 213
 
214
-  DBG ("OPUS decode: size: %d, chan: %d, rate: %d, result %d.\n", size, channels, rate, res);
214
+  /* DBG ("OPUS decode: size: %d, chan: %d, rate: %d, result %d.\n", size, channels, rate, res); */
215 215
 
216 216
   return res;
217 217
 
... ...
@@ -230,7 +230,7 @@ static int opus_plc( unsigned char* out_buf, unsigned int size,
230 230
   codec_inst = (opus_state_t*)h_codec;
231 231
 
232 232
   if (size/channels > AUDIO_BUFFER_SIZE) {
233
-    DBG("OPUS plc: size %d, chan %d exceeds buffer size %d.\n", size, channels, AUDIO_BUFFER_SIZE);
233
+    /* DBG("OPUS plc: size %d, chan %d exceeds buffer size %d.\n", size, channels, AUDIO_BUFFER_SIZE); */
234 234
     return 0;
235 235
   }
236 236
 
... ...
@@ -239,7 +239,7 @@ static int opus_plc( unsigned char* out_buf, unsigned int size,
239 239
     res*=2;
240 240
   }
241 241
 
242
-  DBG ("OPUS plc: size: %d, chan: %d, rate: %d, result %d.\n", size, channels, rate, res);
242
+  /* DBG ("OPUS plc: size: %d, chan: %d, rate: %d, result %d.\n", size, channels, rate, res); */
243 243
 
244 244
   return res;
245 245
 }