rhino/demo/c/dr_libs/tests/wav/dr_wav_decoding.c
Go to the documentation of this file.
1 #define DR_WAV_LIBSNDFILE_COMPAT
2 #include "dr_wav_common.c"
3 
4 #define FILE_NAME_WIDTH 40
5 #define NUMBER_WIDTH 10
6 #define TABLE_MARGIN 2
7 
8 #define DEFAULT_SOURCE_DIR "testvectors/wav/tests"
9 
10 
11 drwav_result decode_test__read_and_compare_pcm_frames_s32(libsndfile* pSndFile, drwav* pWav, drwav_uint64 pcmFrameCount, drwav_int32* pPCMFrames_libsndfile, drwav_int32* pPCMFrames_drwav)
12 {
13  drwav_uint64 pcmFrameCount_libsndfile;
14  drwav_uint64 pcmFrameCount_drwav;
15  drwav_uint64 iPCMFrame;
16 
17  /* To test decoding we just read a number of PCM frames from each decoder and compare. */
18  pcmFrameCount_libsndfile = libsndfile_read_pcm_frames_s32(pSndFile, pcmFrameCount, pPCMFrames_libsndfile);
19  pcmFrameCount_drwav = drwav_read_pcm_frames_s32(pWav, pcmFrameCount, pPCMFrames_drwav);
20 
21  /* The total number of frames we decoded need to match. */
22  if (pcmFrameCount_libsndfile != pcmFrameCount_drwav) {
23  printf(" Decoded frame counts differ: pcmFrameCount=%d, libsndfile=%d, dr_wav=%d", (int)pcmFrameCount, (int)pcmFrameCount_libsndfile, (int)pcmFrameCount_drwav);
24  return DRWAV_ERROR;
25  }
26 
27  /* Each of the decoded PCM frames need to match. */
28  DRWAV_ASSERT(pcmFrameCount_libsndfile == pcmFrameCount_drwav);
29 
30  for (iPCMFrame = 0; iPCMFrame < pcmFrameCount_libsndfile; iPCMFrame += 1) {
31  drwav_int32* pPCMFrame_libsndfile = pPCMFrames_libsndfile + (iPCMFrame * pWav->channels);
32  drwav_int32* pPCMFrame_drwav = pPCMFrames_drwav + (iPCMFrame * pWav->channels);
33  drwav_uint32 iChannel;
34  drwav_bool32 hasError = DRWAV_FALSE;
35 
36  for (iChannel = 0; iChannel < pWav->channels; iChannel += 1) {
37  if (pPCMFrame_libsndfile[iChannel] != pPCMFrame_drwav[iChannel]) {
38  printf(" PCM Frame @ %d[%d] does not match: pcmFrameCount=%d", (int)iPCMFrame, iChannel, (int)pcmFrameCount);
39  hasError = DRWAV_TRUE;
40  break;
41  }
42  }
43 
44  if (hasError) {
45  return DRWAV_ERROR; /* Decoded frames do not match. */
46  }
47  }
48 
49  /* Done. */
50  return DRWAV_SUCCESS;
51 }
52 
54 {
55  drwav_result result = DRWAV_SUCCESS;
56  drwav_uint64 iPCMFrame;
57  drwav_int32* pPCMFrames_libsndfile;
58  drwav_int32* pPCMFrames_drwav;
59 
60  /* Make sure the decoder's are seeked back to the start first. */
61  drwav_seek_to_pcm_frame(pWav, 0);
62  libsndfile_seek_to_pcm_frame(pSndFile, 0);
63 
64  pPCMFrames_libsndfile = (drwav_int32*)malloc((size_t)(pcmFrameChunkSize * pWav->channels * sizeof(drwav_int32)));
65  if (pPCMFrames_libsndfile == NULL) {
66  printf(" [libsndfile] Out of memory");
67  return DRWAV_ERROR;
68  }
69 
70  pPCMFrames_drwav = (drwav_int32*)malloc((size_t)(pcmFrameChunkSize * pWav->channels * sizeof(drwav_int32)));
71  if (pPCMFrames_drwav == NULL) {
72  free(pPCMFrames_libsndfile);
73  printf(" [dr_wav] Out of memory");
74  return DRWAV_ERROR;
75  }
76 
77  for (iPCMFrame = 0; iPCMFrame < pWav->totalPCMFrameCount; iPCMFrame += pcmFrameChunkSize) {
78  result = decode_test__read_and_compare_pcm_frames_s32(pSndFile, pWav, pcmFrameChunkSize, pPCMFrames_libsndfile, pPCMFrames_drwav);
79  if (result != DRWAV_SUCCESS) {
80  break;
81  }
82  }
83 
84  free(pPCMFrames_libsndfile);
85  free(pPCMFrames_drwav);
86 
87  return result;
88 }
89 
90 
91 drwav_result decode_test__read_and_compare_pcm_frames_f32(libsndfile* pSndFile, drwav* pWav, drwav_uint64 pcmFrameCount, float* pPCMFrames_libsndfile, float* pPCMFrames_drwav)
92 {
93  drwav_uint64 pcmFrameCount_libsndfile;
94  drwav_uint64 pcmFrameCount_drwav;
95  drwav_uint64 iPCMFrame;
96 
97  /* To test decoding we just read a number of PCM frames from each decoder and compare. */
98  pcmFrameCount_libsndfile = libsndfile_read_pcm_frames_f32(pSndFile, pcmFrameCount, pPCMFrames_libsndfile);
99  pcmFrameCount_drwav = drwav_read_pcm_frames_f32(pWav, pcmFrameCount, pPCMFrames_drwav);
100 
101  /* The total number of frames we decoded need to match. */
102  if (pcmFrameCount_libsndfile != pcmFrameCount_drwav) {
103  printf(" Decoded frame counts differ: pcmFrameCount=%d, libsndfile=%d, dr_wav=%d", (int)pcmFrameCount, (int)pcmFrameCount_libsndfile, (int)pcmFrameCount_drwav);
104  return DRWAV_ERROR;
105  }
106 
107  /* Each of the decoded PCM frames need to match. */
108  DRWAV_ASSERT(pcmFrameCount_libsndfile == pcmFrameCount_drwav);
109 
110  for (iPCMFrame = 0; iPCMFrame < pcmFrameCount_libsndfile; iPCMFrame += 1) {
111  float* pPCMFrame_libsndfile = pPCMFrames_libsndfile + (iPCMFrame * pWav->channels);
112  float* pPCMFrame_drwav = pPCMFrames_drwav + (iPCMFrame * pWav->channels);
113  drwav_uint32 iChannel;
114  drwav_bool32 hasError = DRWAV_FALSE;
115 
116  for (iChannel = 0; iChannel < pWav->channels; iChannel += 1) {
117  if (pPCMFrame_libsndfile[iChannel] != pPCMFrame_drwav[iChannel]) {
118  printf(" PCM Frame @ %d[%d] does not match: pcmFrameCount=%d", (int)iPCMFrame, iChannel, (int)pcmFrameCount);
119  hasError = DRWAV_TRUE;
120  break;
121  }
122  }
123 
124  if (hasError) {
125  return DRWAV_ERROR; /* Decoded frames do not match. */
126  }
127  }
128 
129  /* Done. */
130  return DRWAV_SUCCESS;
131 }
132 
134 {
135  drwav_result result = DRWAV_SUCCESS;
136  drwav_uint64 iPCMFrame;
137  float* pPCMFrames_libsndfile;
138  float* pPCMFrames_drwav;
139 
140  /* Make sure the decoder's are seeked back to the start first. */
141  drwav_seek_to_pcm_frame(pWav, 0);
142  libsndfile_seek_to_pcm_frame(pSndFile, 0);
143 
144  pPCMFrames_libsndfile = (float*)malloc((size_t)(pcmFrameChunkSize * pWav->channels * sizeof(float)));
145  if (pPCMFrames_libsndfile == NULL) {
146  printf(" [libsndfile] Out of memory");
147  return DRWAV_ERROR;
148  }
149 
150  pPCMFrames_drwav = (float*)malloc((size_t)(pcmFrameChunkSize * pWav->channels * sizeof(float)));
151  if (pPCMFrames_drwav == NULL) {
152  free(pPCMFrames_libsndfile);
153  printf(" [dr_wav] Out of memory");
154  return DRWAV_ERROR;
155  }
156 
157  for (iPCMFrame = 0; iPCMFrame < pWav->totalPCMFrameCount; iPCMFrame += pcmFrameChunkSize) {
158  result = decode_test__read_and_compare_pcm_frames_f32(pSndFile, pWav, pcmFrameChunkSize, pPCMFrames_libsndfile, pPCMFrames_drwav);
159  if (result != DRWAV_SUCCESS) {
160  break;
161  }
162  }
163 
164  free(pPCMFrames_libsndfile);
165  free(pPCMFrames_drwav);
166 
167  return result;
168 }
169 
170 
171 drwav_result decode_test__read_and_compare_pcm_frames_s16(libsndfile* pSndFile, drwav* pWav, drwav_uint64 pcmFrameCount, drwav_int16* pPCMFrames_libsndfile, drwav_int16* pPCMFrames_drwav)
172 {
173  drwav_uint64 pcmFrameCount_libsndfile;
174  drwav_uint64 pcmFrameCount_drwav;
175  drwav_uint64 iPCMFrame;
176 
177  /* To test decoding we just read a number of PCM frames from each decoder and compare. */
178  pcmFrameCount_libsndfile = libsndfile_read_pcm_frames_s16(pSndFile, pcmFrameCount, pPCMFrames_libsndfile);
179  pcmFrameCount_drwav = drwav_read_pcm_frames_s16(pWav, pcmFrameCount, pPCMFrames_drwav);
180 
181  /* The total number of frames we decoded need to match. */
182  if (pcmFrameCount_libsndfile != pcmFrameCount_drwav) {
183  printf(" Decoded frame counts differ: pcmFrameCount=%d, libsndfile=%d, dr_wav=%d", (int)pcmFrameCount, (int)pcmFrameCount_libsndfile, (int)pcmFrameCount_drwav);
184  return DRWAV_ERROR;
185  }
186 
187  /* Each of the decoded PCM frames need to match. */
188  DRWAV_ASSERT(pcmFrameCount_libsndfile == pcmFrameCount_drwav);
189 
190  for (iPCMFrame = 0; iPCMFrame < pcmFrameCount_libsndfile; iPCMFrame += 1) {
191  drwav_int16* pPCMFrame_libsndfile = pPCMFrames_libsndfile + (iPCMFrame * pWav->channels);
192  drwav_int16* pPCMFrame_drwav = pPCMFrames_drwav + (iPCMFrame * pWav->channels);
193  drwav_uint32 iChannel;
194  drwav_bool32 hasError = DRWAV_FALSE;
195 
196  for (iChannel = 0; iChannel < pWav->channels; iChannel += 1) {
197  if (pPCMFrame_libsndfile[iChannel] != pPCMFrame_drwav[iChannel]) {
198  printf(" PCM Frame @ %d[%d] does not match: pcmFrameCount=%d", (int)iPCMFrame, iChannel, (int)pcmFrameCount);
199  hasError = DRWAV_TRUE;
200  break;
201  }
202  }
203 
204  if (hasError) {
205  return DRWAV_ERROR; /* Decoded frames do not match. */
206  }
207  }
208 
209  /* Done. */
210  return DRWAV_SUCCESS;
211 }
212 
214 {
215  drwav_result result = DRWAV_SUCCESS;
216  drwav_uint64 iPCMFrame;
217  drwav_int16* pPCMFrames_libsndfile;
218  drwav_int16* pPCMFrames_drwav;
219 
220  /* Make sure the decoder's are seeked back to the start first. */
221  drwav_seek_to_pcm_frame(pWav, 0);
222  libsndfile_seek_to_pcm_frame(pSndFile, 0);
223 
224  pPCMFrames_libsndfile = (drwav_int16*)malloc((size_t)(pcmFrameChunkSize * pWav->channels * sizeof(drwav_int16)));
225  if (pPCMFrames_libsndfile == NULL) {
226  printf(" [libsndfile] Out of memory");
227  return DRWAV_ERROR;
228  }
229 
230  pPCMFrames_drwav = (drwav_int16*)malloc((size_t)(pcmFrameChunkSize * pWav->channels * sizeof(drwav_int16)));
231  if (pPCMFrames_drwav == NULL) {
232  free(pPCMFrames_libsndfile);
233  printf(" [dr_wav] Out of memory");
234  return DRWAV_ERROR;
235  }
236 
237  for (iPCMFrame = 0; iPCMFrame < pWav->totalPCMFrameCount; iPCMFrame += pcmFrameChunkSize) {
238  result = decode_test__read_and_compare_pcm_frames_s16(pSndFile, pWav, pcmFrameChunkSize, pPCMFrames_libsndfile, pPCMFrames_drwav);
239  if (result != DRWAV_SUCCESS) {
240  break;
241  }
242  }
243 
244  free(pPCMFrames_libsndfile);
245  free(pPCMFrames_drwav);
246 
247  return result;
248 }
249 
250 
252 {
253  drwav_result result = DRWAV_SUCCESS;
254 
255  /* Start with reading the entire file in one go. */
256  if (result == DRWAV_SUCCESS) {
258  }
259 
260  /* Now try with reading one PCM frame at a time.*/
261  if (result == DRWAV_SUCCESS) {
262  result = decode_test__read_and_compare_pcm_frame_chunks_s32(pSndFile, pWav, 1);
263  }
264 
265  return result;
266 }
267 
269 {
270  drwav_result result = DRWAV_SUCCESS;
271 
272  /* Start with reading the entire file in one go. */
273  if (result == DRWAV_SUCCESS) {
275  }
276 
277  /* Now try with reading one PCM frame at a time.*/
278  if (result == DRWAV_SUCCESS) {
279  result = decode_test__read_and_compare_pcm_frame_chunks_f32(pSndFile, pWav, 1);
280  }
281 
282  return result;
283 }
284 
286 {
287  drwav_result result = DRWAV_SUCCESS;
288 
289  /* Start with reading the entire file in one go. */
290  if (result == DRWAV_SUCCESS) {
292  }
293 
294  /* Now try with reading one PCM frame at a time.*/
295  if (result == DRWAV_SUCCESS) {
296  result = decode_test__read_and_compare_pcm_frame_chunks_s16(pSndFile, pWav, 1);
297  }
298 
299  return result;
300 }
301 
302 drwav_result decode_test_file(const char* pFilePath)
303 {
304  /* To test seeking we just seek to our target PCM frame and then decode whatever is remaining and compare it against libsndfile. */
305  drwav_result result;
307  drwav wav;
308 
310 
311  /* First load the decoder from libsndfile. */
312  result = libsndfile_init_file(pFilePath, &libsndfile);
313  if (result != DRWAV_SUCCESS) {
314  printf(" Failed to open via libsndfile.");
315  return result;
316  }
317 
318  /* Now load from dr_wav. */
319  if (!drwav_init_file_with_metadata(&wav, pFilePath, 0, NULL)) {
320  printf(" Failed to open via dr_wav.");
322  return DRWAV_ERROR; /* Failed to load dr_wav decoder. */
323  }
324 
325  /* At this point we should have both libsndfile and dr_wav decoders open. We can now perform identical operations on each of them and compare. */
326  result = decode_test_file_s32(&libsndfile, &wav);
327  if (result != DRWAV_SUCCESS) {
328  drwav_uninit(&wav);
330  return result;
331  }
332 
333  result = decode_test_file_f32(&libsndfile, &wav);
334  if (result != DRWAV_SUCCESS) {
335  drwav_uninit(&wav);
337  return result;
338  }
339 
340  result = decode_test_file_s16(&libsndfile, &wav);
341  if (result != DRWAV_SUCCESS) {
342  drwav_uninit(&wav);
344  return result;
345  }
346 
347 
348  /* We're done with our decoders. */
349  drwav_uninit(&wav);
351 
352  if (result == DRWAV_SUCCESS) {
353  printf(" Passed");
354  }
355 
356  return result;
357 }
358 
359 drwav_result decode_test_directory(const char* pDirectoryPath)
360 {
361  dr_file_iterator iteratorState;
362  dr_file_iterator* pFile;
363 
364  dr_printf_fixed(FILE_NAME_WIDTH, "%s", pDirectoryPath);
366  printf("\n");
367 
368  pFile = dr_file_iterator_begin(pDirectoryPath, &iteratorState);
369  while (pFile != NULL) {
370  drwav_result result;
371 
372  /* Skip directories for now, but we may want to look at doing recursive file iteration. */
373  if (!pFile->isDirectory) {
374  result = decode_test_file(pFile->absolutePath);
375  (void)result;
376 
377  printf("\n");
378  }
379 
380  pFile = dr_file_iterator_next(pFile);
381  }
382 
383  return DRWAV_SUCCESS;
384 }
385 
387 {
388  drwav_result result = DRWAV_SUCCESS;
389 
390  /* Directories. */
391  {
393  (void)result;
394  }
395 
396  return result;
397 }
398 
400 {
401  return DRWAV_SUCCESS;
402 }
403 
404 int main(int argc, char** argv)
405 {
406  drwav_result result = DRWAV_SUCCESS;
407  drwav_bool32 doTesting = DRWAV_TRUE;
408  drwav_bool32 doProfiling = DRWAV_TRUE;
409 
410  if (dr_argv_is_set(argc, argv, "--onlyprofile")) {
411  doTesting = DRWAV_FALSE;
412  }
413 
415  printf("Failed to initialize libsndfile API.");
416  return -1;
417  }
418 
419  if (doTesting) {
420  printf("=======================================================================\n");
421  printf("DECODE TESTING\n");
422  printf("=======================================================================\n");
423  result = decode_test();
424  if (result != DRWAV_SUCCESS) {
425  goto done; /* Don't continue if an error occurs during testing. */
426  }
427  printf("\n");
428  } else {
429  printf("=======================================================================\n");
430  printf("WARNING: Correctness Tests Disabled\n");
431  printf("=======================================================================\n");
432  }
433 
434  /* Profiling. */
435  if (doProfiling) {
436  printf("=======================================================================\n");
437  printf("DECODE PROFILING (LOWER IS BETTER)\n");
438  printf("=======================================================================\n");
439  result = decode_profiling();
440  printf("\n");
441  }
442 
443 done:
445  return (int)result;
446 }
dr_file_iterator_next
dr_file_iterator * dr_file_iterator_next(dr_file_iterator *pState)
Definition: porcupine/demo/c/dr_libs/tests/common/dr_common.c:495
DRWAV_FALSE
#define DRWAV_FALSE
Definition: porcupine/demo/c/dr_libs/dr_wav.h:165
drwav_bool32
drwav_uint32 drwav_bool32
Definition: porcupine/demo/c/dr_libs/dr_wav.h:163
decode_profiling
drwav_result decode_profiling()
Definition: rhino/demo/c/dr_libs/tests/wav/dr_wav_decoding.c:399
libsndfile_init_file
drwav_result libsndfile_init_file(const char *pFilePath, libsndfile *pSndFile)
Definition: porcupine/demo/c/dr_libs/tests/wav/dr_wav_common.c:140
decode_test_directory
drwav_result decode_test_directory(const char *pDirectoryPath)
Definition: rhino/demo/c/dr_libs/tests/wav/dr_wav_decoding.c:359
libsndfile_read_pcm_frames_s16
drwav_uint64 libsndfile_read_pcm_frames_s16(libsndfile *pSndFile, drwav_uint64 framesToRead, drwav_int16 *pBufferOut)
Definition: porcupine/demo/c/dr_libs/tests/wav/dr_wav_common.c:182
drwav::totalPCMFrameCount
drwav_uint64 totalPCMFrameCount
Definition: porcupine/demo/c/dr_libs/dr_wav.h:843
drwav_read_pcm_frames_f32
DRWAV_API drwav_uint64 drwav_read_pcm_frames_f32(drwav *pWav, drwav_uint64 framesToRead, float *pBufferOut)
Definition: porcupine/demo/c/pvrecorder/src/miniaudio/extras/miniaudio_split/miniaudio.c:50305
NULL
#define NULL
Definition: porcupine/demo/c/dr_libs/tests/external/miniaudio/extras/speex_resampler/thirdparty/resample.c:92
libsndfile_read_pcm_frames_f32
drwav_uint64 libsndfile_read_pcm_frames_f32(libsndfile *pSndFile, drwav_uint64 framesToRead, float *pBufferOut)
Definition: porcupine/demo/c/dr_libs/tests/wav/dr_wav_common.c:246
decode_test__read_and_compare_pcm_frames_s32
drwav_result decode_test__read_and_compare_pcm_frames_s32(libsndfile *pSndFile, drwav *pWav, drwav_uint64 pcmFrameCount, drwav_int32 *pPCMFrames_libsndfile, drwav_int32 *pPCMFrames_drwav)
Definition: rhino/demo/c/dr_libs/tests/wav/dr_wav_decoding.c:11
DRWAV_SUCCESS
#define DRWAV_SUCCESS
Definition: porcupine/demo/c/dr_libs/dr_wav.h:198
drwav_read_pcm_frames_s16
DRWAV_API drwav_uint64 drwav_read_pcm_frames_s16(drwav *pWav, drwav_uint64 framesToRead, drwav_int16 *pBufferOut)
Definition: porcupine/demo/c/pvrecorder/src/miniaudio/extras/miniaudio_split/miniaudio.c:50013
drwav_seek_to_pcm_frame
DRWAV_API drwav_bool32 drwav_seek_to_pcm_frame(drwav *pWav, drwav_uint64 targetFrameIndex)
Definition: porcupine/demo/c/pvrecorder/src/miniaudio/extras/miniaudio_split/miniaudio.c:49385
decode_test_file_f32
drwav_result decode_test_file_f32(libsndfile *pSndFile, drwav *pWav)
Definition: rhino/demo/c/dr_libs/tests/wav/dr_wav_decoding.c:268
FILE_NAME_WIDTH
#define FILE_NAME_WIDTH
Definition: rhino/demo/c/dr_libs/tests/wav/dr_wav_decoding.c:4
drwav_result
drwav_int32 drwav_result
Definition: porcupine/demo/c/dr_libs/dr_wav.h:197
drwav_uint64
unsigned long long drwav_uint64
Definition: porcupine/demo/c/dr_libs/dr_wav.h:152
dr_file_iterator::isDirectory
dr_bool32 isDirectory
Definition: porcupine/demo/c/dr_libs/tests/common/dr_common.c:383
dr_printf_fixed_with_margin
int dr_printf_fixed_with_margin(int width, int margin, const char *const format,...)
Definition: porcupine/demo/c/dr_libs/tests/common/dr_common.c:755
decode_test_file_s32
drwav_result decode_test_file_s32(libsndfile *pSndFile, drwav *pWav)
Definition: rhino/demo/c/dr_libs/tests/wav/dr_wav_decoding.c:251
dr_file_iterator
Definition: porcupine/demo/c/dr_libs/tests/common/dr_common.c:378
libsndfile_uninit_api
void libsndfile_uninit_api()
Definition: porcupine/demo/c/dr_libs/tests/wav/dr_wav_common.c:67
main
int main(int argc, char **argv)
Definition: rhino/demo/c/dr_libs/tests/wav/dr_wav_decoding.c:404
libsndfile_uninit
void libsndfile_uninit(libsndfile *pSndFile)
Definition: porcupine/demo/c/dr_libs/tests/wav/dr_wav_common.c:172
libsndfile_init_api
drwav_result libsndfile_init_api()
Definition: porcupine/demo/c/dr_libs/tests/wav/dr_wav_common.c:24
drwav_int32
signed int drwav_int32
Definition: porcupine/demo/c/dr_libs/dr_wav.h:138
decode_test
drwav_result decode_test()
Definition: rhino/demo/c/dr_libs/tests/wav/dr_wav_decoding.c:386
drwav_init_file_with_metadata
DRWAV_API drwav_bool32 drwav_init_file_with_metadata(drwav *pWav, const char *filename, drwav_uint32 flags, const drwav_allocation_callbacks *pAllocationCallbacks)
Definition: porcupine/demo/c/pvrecorder/src/miniaudio/extras/miniaudio_split/miniaudio.c:48983
decode_test_file_s16
drwav_result decode_test_file_s16(libsndfile *pSndFile, drwav *pWav)
Definition: rhino/demo/c/dr_libs/tests/wav/dr_wav_decoding.c:285
dr_argv_is_set
dr_bool32 dr_argv_is_set(int argc, char **argv, const char *value)
Definition: porcupine/demo/c/dr_libs/tests/common/dr_common.c:681
DEFAULT_SOURCE_DIR
#define DEFAULT_SOURCE_DIR
Definition: rhino/demo/c/dr_libs/tests/wav/dr_wav_decoding.c:8
dr_path_file_name
const char * dr_path_file_name(const char *path)
Definition: porcupine/demo/c/dr_libs/tests/common/dr_common.c:296
decode_test__read_and_compare_pcm_frames_s16
drwav_result decode_test__read_and_compare_pcm_frames_s16(libsndfile *pSndFile, drwav *pWav, drwav_uint64 pcmFrameCount, drwav_int16 *pPCMFrames_libsndfile, drwav_int16 *pPCMFrames_drwav)
Definition: rhino/demo/c/dr_libs/tests/wav/dr_wav_decoding.c:171
drwav_read_pcm_frames_s32
DRWAV_API drwav_uint64 drwav_read_pcm_frames_s32(drwav *pWav, drwav_uint64 framesToRead, drwav_int32 *pBufferOut)
Definition: porcupine/demo/c/pvrecorder/src/miniaudio/extras/miniaudio_split/miniaudio.c:50607
decode_test__read_and_compare_pcm_frames_f32
drwav_result decode_test__read_and_compare_pcm_frames_f32(libsndfile *pSndFile, drwav *pWav, drwav_uint64 pcmFrameCount, float *pPCMFrames_libsndfile, float *pPCMFrames_drwav)
Definition: rhino/demo/c/dr_libs/tests/wav/dr_wav_decoding.c:91
DRWAV_ASSERT
#define DRWAV_ASSERT(expression)
Definition: porcupine/demo/c/pvrecorder/src/miniaudio/extras/miniaudio_split/miniaudio.c:46282
NUMBER_WIDTH
#define NUMBER_WIDTH
Definition: rhino/demo/c/dr_libs/tests/wav/dr_wav_decoding.c:5
drwav_int16
signed short drwav_int16
Definition: porcupine/demo/c/dr_libs/dr_wav.h:136
decode_test__read_and_compare_pcm_frame_chunks_s32
drwav_result decode_test__read_and_compare_pcm_frame_chunks_s32(libsndfile *pSndFile, drwav *pWav, drwav_uint64 pcmFrameChunkSize)
Definition: rhino/demo/c/dr_libs/tests/wav/dr_wav_decoding.c:53
drwav::channels
drwav_uint16 channels
Definition: porcupine/demo/c/dr_libs/dr_wav.h:834
decode_test__read_and_compare_pcm_frame_chunks_f32
drwav_result decode_test__read_and_compare_pcm_frame_chunks_f32(libsndfile *pSndFile, drwav *pWav, drwav_uint64 pcmFrameChunkSize)
Definition: rhino/demo/c/dr_libs/tests/wav/dr_wav_decoding.c:133
drwav_uninit
DRWAV_API drwav_result drwav_uninit(drwav *pWav)
Definition: porcupine/demo/c/pvrecorder/src/miniaudio/extras/miniaudio_split/miniaudio.c:49216
drwav_uint32
unsigned int drwav_uint32
Definition: porcupine/demo/c/dr_libs/dr_wav.h:139
dr_printf_fixed
int dr_printf_fixed(int width, const char *const format,...)
Definition: porcupine/demo/c/dr_libs/tests/common/dr_common.c:729
dr_file_iterator::absolutePath
char absolutePath[256]
Definition: porcupine/demo/c/dr_libs/tests/common/dr_common.c:382
drwav
Definition: porcupine/demo/c/dr_libs/dr_wav.h:805
libsndfile_read_pcm_frames_s32
drwav_uint64 libsndfile_read_pcm_frames_s32(libsndfile *pSndFile, drwav_uint64 framesToRead, drwav_int32 *pBufferOut)
Definition: porcupine/demo/c/dr_libs/tests/wav/dr_wav_common.c:255
python.test_porcupine.argv
argv
Definition: test_porcupine.py:158
decode_test__read_and_compare_pcm_frame_chunks_s16
drwav_result decode_test__read_and_compare_pcm_frame_chunks_s16(libsndfile *pSndFile, drwav *pWav, drwav_uint64 pcmFrameChunkSize)
Definition: rhino/demo/c/dr_libs/tests/wav/dr_wav_decoding.c:213
TABLE_MARGIN
#define TABLE_MARGIN
Definition: rhino/demo/c/dr_libs/tests/wav/dr_wav_decoding.c:6
decode_test_file
drwav_result decode_test_file(const char *pFilePath)
Definition: rhino/demo/c/dr_libs/tests/wav/dr_wav_decoding.c:302
DRWAV_TRUE
#define DRWAV_TRUE
Definition: porcupine/demo/c/dr_libs/dr_wav.h:164
dr_file_iterator_begin
dr_file_iterator * dr_file_iterator_begin(const char *pFolderPath, dr_file_iterator *pState)
Definition: porcupine/demo/c/dr_libs/tests/common/dr_common.c:391
DRWAV_ERROR
#define DRWAV_ERROR
Definition: porcupine/demo/c/dr_libs/dr_wav.h:199
libsndfile
Definition: porcupine/demo/c/dr_libs/tests/wav/dr_wav_common.c:77
dr_wav_common.c
libsndfile_seek_to_pcm_frame
drwav_bool32 libsndfile_seek_to_pcm_frame(libsndfile *pSndFile, drwav_uint64 targetPCMFrameIndex)
Definition: porcupine/demo/c/dr_libs/tests/wav/dr_wav_common.c:319


picovoice_driver
Author(s):
autogenerated on Fri Apr 1 2022 02:13:55