OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
9 */ | 9 */ |
10 | 10 |
(...skipping 521 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
532 while (endfile == 0) { | 532 while (endfile == 0) { |
533 | 533 |
534 if(testNum == 7 && (rand()%2 == 0)) { | 534 if(testNum == 7 && (rand()%2 == 0)) { |
535 err = WebRtcIsacfix_EncoderInit(ISAC_main_inst, CodingMode); | 535 err = WebRtcIsacfix_EncoderInit(ISAC_main_inst, CodingMode); |
536 /* Error check */ | 536 /* Error check */ |
537 if (err < 0) { | 537 if (err < 0) { |
538 errtype=WebRtcIsacfix_GetErrorCode(ISAC_main_inst); | 538 errtype=WebRtcIsacfix_GetErrorCode(ISAC_main_inst); |
539 printf("\n\n Error in encoderinit: %d.\n\n", errtype); | 539 printf("\n\n Error in encoderinit: %d.\n\n", errtype); |
540 } | 540 } |
541 | 541 |
542 err = WebRtcIsacfix_DecoderInit(ISAC_main_inst); | 542 WebRtcIsacfix_DecoderInit(ISAC_main_inst); |
543 /* Error check */ | |
544 if (err < 0) { | |
545 errtype=WebRtcIsacfix_GetErrorCode(ISAC_main_inst); | |
546 printf("\n\n Error in decoderinit: %d.\n\n", errtype); | |
547 } | |
548 } | 543 } |
549 | 544 |
550 | 545 |
551 cur_framesmpls = 0; | 546 cur_framesmpls = 0; |
552 while (1) { | 547 while (1) { |
553 /* Read 10 ms speech block */ | 548 /* Read 10 ms speech block */ |
554 if (nbTest != 1) { | 549 if (nbTest != 1) { |
555 endfile = readframe(shortdata, inp, FRAMESAMPLES_10ms); | 550 endfile = readframe(shortdata, inp, FRAMESAMPLES_10ms); |
556 } else { | 551 } else { |
557 endfile = readframe(shortdata, inp, (FRAMESAMPLES_10ms/2)); | 552 endfile = readframe(shortdata, inp, (FRAMESAMPLES_10ms/2)); |
(...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
831 fclose(inp); | 826 fclose(inp); |
832 fclose(outp); | 827 fclose(outp); |
833 fclose(outbits); | 828 fclose(outbits); |
834 | 829 |
835 if ( testCE == 1) { | 830 if ( testCE == 1) { |
836 WebRtcIsacfix_FreeInternal(ISAC_main_inst); | 831 WebRtcIsacfix_FreeInternal(ISAC_main_inst); |
837 } | 832 } |
838 WebRtcIsacfix_Free(ISAC_main_inst); | 833 WebRtcIsacfix_Free(ISAC_main_inst); |
839 return 0; | 834 return 0; |
840 } | 835 } |
OLD | NEW |