| OLD | NEW |
| 1 /* Copyright (c) 2011-2013 Xiph.Org Foundation | 1 /* Copyright (c) 2011-2013 Xiph.Org Foundation |
| 2 Written by Gregory Maxwell */ | 2 Written by Gregory Maxwell */ |
| 3 /* | 3 /* |
| 4 Redistribution and use in source and binary forms, with or without | 4 Redistribution and use in source and binary forms, with or without |
| 5 modification, are permitted provided that the following conditions | 5 modification, are permitted provided that the following conditions |
| 6 are met: | 6 are met: |
| 7 | 7 |
| 8 - Redistributions of source code must retain the above copyright | 8 - Redistributions of source code must retain the above copyright |
| 9 notice, this list of conditions and the following disclaimer. | 9 notice, this list of conditions and the following disclaimer. |
| 10 | 10 |
| (...skipping 1365 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1376 cfgs++; | 1376 cfgs++; |
| 1377 err=opus_encoder_ctl(enc,OPUS_SET_EXPERT_FRAME_DURATION(OPUS_FRAMESIZE_20_MS)
); | 1377 err=opus_encoder_ctl(enc,OPUS_SET_EXPERT_FRAME_DURATION(OPUS_FRAMESIZE_20_MS)
); |
| 1378 if(err!=OPUS_OK)test_failed(); | 1378 if(err!=OPUS_OK)test_failed(); |
| 1379 cfgs++; | 1379 cfgs++; |
| 1380 err=opus_encoder_ctl(enc,OPUS_SET_EXPERT_FRAME_DURATION(OPUS_FRAMESIZE_40_MS)
); | 1380 err=opus_encoder_ctl(enc,OPUS_SET_EXPERT_FRAME_DURATION(OPUS_FRAMESIZE_40_MS)
); |
| 1381 if(err!=OPUS_OK)test_failed(); | 1381 if(err!=OPUS_OK)test_failed(); |
| 1382 cfgs++; | 1382 cfgs++; |
| 1383 err=opus_encoder_ctl(enc,OPUS_SET_EXPERT_FRAME_DURATION(OPUS_FRAMESIZE_60_MS)
); | 1383 err=opus_encoder_ctl(enc,OPUS_SET_EXPERT_FRAME_DURATION(OPUS_FRAMESIZE_60_MS)
); |
| 1384 if(err!=OPUS_OK)test_failed(); | 1384 if(err!=OPUS_OK)test_failed(); |
| 1385 cfgs++; | 1385 cfgs++; |
| 1386 err=opus_encoder_ctl(enc,OPUS_SET_EXPERT_FRAME_DURATION(OPUS_FRAMESIZE_80_MS)
); |
| 1387 if(err!=OPUS_OK)test_failed(); |
| 1388 cfgs++; |
| 1389 err=opus_encoder_ctl(enc,OPUS_SET_EXPERT_FRAME_DURATION(OPUS_FRAMESIZE_100_MS
)); |
| 1390 if(err!=OPUS_OK)test_failed(); |
| 1391 cfgs++; |
| 1392 err=opus_encoder_ctl(enc,OPUS_SET_EXPERT_FRAME_DURATION(OPUS_FRAMESIZE_120_MS
)); |
| 1393 if(err!=OPUS_OK)test_failed(); |
| 1394 cfgs++; |
| 1386 CHECK_SETGET(OPUS_SET_EXPERT_FRAME_DURATION(i),OPUS_GET_EXPERT_FRAME_DURATION
(&i),0,-1, | 1395 CHECK_SETGET(OPUS_SET_EXPERT_FRAME_DURATION(i),OPUS_GET_EXPERT_FRAME_DURATION
(&i),0,-1, |
| 1387 OPUS_FRAMESIZE_60_MS,OPUS_FRAMESIZE_ARG, | 1396 OPUS_FRAMESIZE_60_MS,OPUS_FRAMESIZE_ARG, |
| 1388 " OPUS_SET_EXPERT_FRAME_DURATION ............... OK.\n", | 1397 " OPUS_SET_EXPERT_FRAME_DURATION ............... OK.\n", |
| 1389 " OPUS_GET_EXPERT_FRAME_DURATION ............... OK.\n") | 1398 " OPUS_GET_EXPERT_FRAME_DURATION ............... OK.\n") |
| 1390 | 1399 |
| 1391 /*OPUS_SET_FORCE_MODE is not tested here because it's not a public API, howev
er the encoder tests use it*/ | 1400 /*OPUS_SET_FORCE_MODE is not tested here because it's not a public API, howev
er the encoder tests use it*/ |
| 1392 | 1401 |
| 1393 err=opus_encoder_ctl(enc,OPUS_GET_FINAL_RANGE((opus_uint32 *)NULL)); | 1402 err=opus_encoder_ctl(enc,OPUS_GET_FINAL_RANGE((opus_uint32 *)NULL)); |
| 1394 if(err!=OPUS_BAD_ARG)test_failed(); | 1403 if(err!=OPUS_BAD_ARG)test_failed(); |
| 1395 cfgs++; | 1404 cfgs++; |
| (...skipping 492 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1888 total+=test_msdec_api(); | 1897 total+=test_msdec_api(); |
| 1889 total+=test_parse(); | 1898 total+=test_parse(); |
| 1890 total+=test_enc_api(); | 1899 total+=test_enc_api(); |
| 1891 total+=test_repacketizer_api(); | 1900 total+=test_repacketizer_api(); |
| 1892 total+=test_malloc_fail(); | 1901 total+=test_malloc_fail(); |
| 1893 | 1902 |
| 1894 fprintf(stderr,"\nAll API tests passed.\nThe libopus API was invoked %d times
.\n",total); | 1903 fprintf(stderr,"\nAll API tests passed.\nThe libopus API was invoked %d times
.\n",total); |
| 1895 | 1904 |
| 1896 return 0; | 1905 return 0; |
| 1897 } | 1906 } |
| OLD | NEW |