@@ -147,6 +147,8 @@ opus_int32 test_dec_api(void)
147
147
fprintf (stdout ," opus_decoder_create() ........................ OK.\n" );
148
148
fprintf (stdout ," opus_decoder_init() .......................... OK.\n" );
149
149
150
+ err = opus_decoder_ctl (dec , OPUS_GET_FINAL_RANGE ((opus_uint32 * )NULL ));
151
+ if (err != OPUS_BAD_ARG )test_failed ();
150
152
VG_UNDEF (& dec_final_range ,sizeof (dec_final_range ));
151
153
err = opus_decoder_ctl (dec , OPUS_GET_FINAL_RANGE (& dec_final_range ));
152
154
if (err != OPUS_OK )test_failed ();
@@ -159,12 +161,22 @@ opus_int32 test_dec_api(void)
159
161
fprintf (stdout ," OPUS_UNIMPLEMENTED ........................... OK.\n" );
160
162
cfgs ++ ;
161
163
164
+ err = opus_decoder_ctl (dec , OPUS_GET_BANDWIDTH ((opus_int32 * )NULL ));
165
+ if (err != OPUS_BAD_ARG )test_failed ();
162
166
VG_UNDEF (& i ,sizeof (i ));
163
167
err = opus_decoder_ctl (dec , OPUS_GET_BANDWIDTH (& i ));
164
168
if (err != OPUS_OK || i != 0 )test_failed ();
165
169
fprintf (stdout ," OPUS_GET_BANDWIDTH ........................... OK.\n" );
166
170
cfgs ++ ;
167
171
172
+ err = opus_decoder_ctl (dec , OPUS_GET_SAMPLE_RATE ((opus_int32 * )NULL ));
173
+ if (err != OPUS_BAD_ARG )test_failed ();
174
+ VG_UNDEF (& i ,sizeof (i ));
175
+ err = opus_decoder_ctl (dec , OPUS_GET_SAMPLE_RATE (& i ));
176
+ if (err != OPUS_OK || i != 48000 )test_failed ();
177
+ fprintf (stdout ," OPUS_GET_SAMPLE_RATE ......................... OK.\n" );
178
+ cfgs ++ ;
179
+
168
180
/*GET_PITCH has different execution paths depending on the previously decoded frame.*/
169
181
err = opus_decoder_ctl (dec , OPUS_GET_PITCH (nullvalue ));
170
182
if (err != OPUS_BAD_ARG )test_failed ();
@@ -190,6 +202,14 @@ opus_int32 test_dec_api(void)
190
202
cfgs ++ ;
191
203
fprintf (stdout ," OPUS_GET_PITCH ............................... OK.\n" );
192
204
205
+ err = opus_decoder_ctl (dec , OPUS_GET_LAST_PACKET_DURATION ((opus_int32 * )NULL ));
206
+ if (err != OPUS_BAD_ARG )test_failed ();
207
+ VG_UNDEF (& i ,sizeof (i ));
208
+ err = opus_decoder_ctl (dec , OPUS_GET_LAST_PACKET_DURATION (& i ));
209
+ if (err != OPUS_OK || i != 960 )test_failed ();
210
+ cfgs ++ ;
211
+ fprintf (stdout ," OPUS_GET_LAST_PACKET_DURATION ................ OK.\n" );
212
+
193
213
VG_UNDEF (& i ,sizeof (i ));
194
214
err = opus_decoder_ctl (dec , OPUS_GET_GAIN (& i ));
195
215
VG_CHECK (& i ,sizeof (i ));
0 commit comments