rhino/demo/c/dr_libs/tests/flac/dr_flac_seeking.c
Go to the documentation of this file.
1 /*#define DR_FLAC_NO_CRC*/
2 #include "dr_flac_common.c"
3 
4 #define PROFILING_NAME_WIDTH 40
5 #define PROFILING_NUMBER_WIDTH 10
6 #define PROFILING_NUMBER_MARGIN 2
7 
8 typedef struct
9 {
10  double totalSeconds_BruteForce;
11  double totalSeconds_BinarySearch;
12  double totalSeconds_SeekTable;
14 
16 {
17  DRFLAC_ZERO_MEMORY(pProfiling, sizeof(*pProfiling));
18 }
19 
21 {
22  profiling_state result;
26 
27  return result;
28 }
29 
30 
31 drflac_result seek_test_pcm_frame(libflac* pLibFlac, drflac* pFlac, drflac_uint64 targetPCMFrameIndex)
32 {
33  drflac_bool32 seekResult;
34  drflac_uint64 pcmFrameCount_libflac;
35  drflac_uint64 pcmFrameCount_drflac;
36  drflac_int32* pPCMFrames_libflac;
37  drflac_int32* pPCMFrames_drflac;
38  drflac_uint64 iPCMFrame;
39 
41  if (pFlac->seekpointCount == 0) {
42  printf(" No seek table");
43  return DRFLAC_ERROR;
44  }
45  }
46 
47  /*
48  To test seeking we just seek to the PCM frame, and then decode the rest of the file. If the PCM frames we read
49  differs between the two implementations there's something wrong with one of them (probably dr_flac).
50  */
51  seekResult = libflac_seek_to_pcm_frame(pLibFlac, targetPCMFrameIndex);
52  if (seekResult == DRFLAC_FALSE) {
53  printf(" [libFLAC] Failed to seek to PCM frame @ %d", (int)targetPCMFrameIndex);
54  return DRFLAC_ERROR;
55  }
56 
57  seekResult = drflac_seek_to_pcm_frame(pFlac, targetPCMFrameIndex);
58  if (seekResult == DRFLAC_FALSE) {
59  printf(" [dr_flac] Failed to seek to PCM frame @ %d", (int)targetPCMFrameIndex);
60  return DRFLAC_ERROR;
61  }
62 
63  if (pLibFlac->currentPCMFrame != pFlac->currentPCMFrame) {
64  printf(" Current PCM frame inconsistent @ %d: libFLAC=%d, dr_flac=%d", (int)targetPCMFrameIndex, (int)pLibFlac->currentPCMFrame, (int)pFlac->currentPCMFrame);
65  return DRFLAC_ERROR;
66  }
67 
68  /*
69  Now we decode the rest of the file and compare the samples. Note that we try reading the _entire_ file, not just the leftovers, to ensure we
70  haven't seeked too short.
71  */
72  pPCMFrames_libflac = (drflac_int32*)malloc((size_t)(pLibFlac->pcmFrameCount * pLibFlac->channels * sizeof(drflac_int32)));
73  if (pPCMFrames_libflac == NULL) {
74  printf(" [libFLAC] Out of memory");
75  return DRFLAC_ERROR;
76  }
77  pcmFrameCount_libflac = libflac_read_pcm_frames_s32(pLibFlac, pLibFlac->pcmFrameCount, pPCMFrames_libflac);
78 
79  pPCMFrames_drflac = (drflac_int32*)malloc((size_t)(pLibFlac->pcmFrameCount * pLibFlac->channels * sizeof(drflac_int32)));
80  if (pPCMFrames_drflac == NULL) {
81  free(pPCMFrames_libflac);
82  printf(" [dr_flac] Out of memory");
83  return DRFLAC_ERROR;
84  }
85  pcmFrameCount_drflac = drflac_read_pcm_frames_s32(pFlac, pLibFlac->pcmFrameCount, pPCMFrames_drflac);
86 
87  /* The total number of frames we decoded need to match. */
88  if (pcmFrameCount_libflac != pcmFrameCount_drflac) {
89  free(pPCMFrames_drflac);
90  free(pPCMFrames_libflac);
91  printf(" Decoded frame counts differ @ %d: libFLAC=%d, dr_flac=%d", (int)targetPCMFrameIndex, (int)pLibFlac->currentPCMFrame, (int)pFlac->currentPCMFrame);
92  return DRFLAC_ERROR;
93  }
94 
95  /* Each of the decoded PCM frames need to match. */
96  DRFLAC_ASSERT(pcmFrameCount_libflac == pcmFrameCount_drflac);
97 
98  for (iPCMFrame = 0; iPCMFrame < pcmFrameCount_libflac; iPCMFrame += 1) {
99  drflac_int32* pPCMFrame_libflac = pPCMFrames_libflac + (iPCMFrame * pLibFlac->channels);
100  drflac_int32* pPCMFrame_drflac = pPCMFrames_drflac + (iPCMFrame * pLibFlac->channels);
101  drflac_uint32 iChannel;
102  drflac_bool32 hasError = DRFLAC_FALSE;
103 
104  for (iChannel = 0; iChannel < pLibFlac->channels; iChannel += 1) {
105  if (pPCMFrame_libflac[iChannel] != pPCMFrame_drflac[iChannel]) {
106  printf(" PCM Frame @ %d[%d] does not match: targetPCMFrameIndex=%d", (int)iPCMFrame, iChannel, (int)targetPCMFrameIndex);
107  hasError = DRFLAC_TRUE;
108  break;
109  }
110  }
111 
112  if (hasError) {
113  free(pPCMFrames_drflac);
114  free(pPCMFrames_libflac);
115  return DRFLAC_ERROR; /* Decoded frames do not match. */
116  }
117  }
118 
119 
120  /* Done. */
121  free(pPCMFrames_drflac);
122  free(pPCMFrames_libflac);
123 
124  return DRFLAC_SUCCESS;
125 }
126 
127 drflac_result seek_test_file(const char* pFilePath)
128 {
129  /* To test seeking we just seek to our target PCM frame and then decode whatever is remaining and compare it against libFLAC. */
130  drflac_result result;
132  drflac* pFlac;
133  drflac_uint32 iteration;
134  drflac_uint32 totalIterationCount = 10;
135 
137 
138  /* First load the decoder from libFLAC. */
139  result = libflac_init_file(pFilePath, &libflac);
140  if (result != DRFLAC_SUCCESS) {
141  printf(" Failed to open via libFLAC.");
142  return result;
143  }
144 
145  /* Now load from dr_flac. */
146  pFlac = drflac_open_file(pFilePath, NULL);
147  if (pFlac == NULL) {
148  printf(" Failed to open via dr_flac.");
150  return DRFLAC_ERROR; /* Failed to load dr_flac decoder. */
151  }
152 
153  /* Use these to use specific seeking methods. Set all to false to use the normal prioritization (seek table, then binary search, then brute force). */
157 
158  /* At this point we should have both libFLAC and dr_flac decoders open. We can now perform identical operations on each of them and compare. */
159 
160  /* Start with the basics: Seek to the very end, and then the very start. */
161  if (result == DRFLAC_SUCCESS) {
163  }
164  if (result == DRFLAC_SUCCESS) {
165  result = seek_test_pcm_frame(&libflac, pFlac, 0);
166  }
167 
168  /* Now we'll try seeking to random locations. */
169  dr_seed(1234);
170 
171  iteration = 0;
172  while (result == DRFLAC_SUCCESS && iteration < totalIterationCount) {
173  dr_uint64 targetPCMFrame = dr_rand_range_u64(0, libflac.pcmFrameCount);
174  if (targetPCMFrame > libflac.pcmFrameCount) {
175  DRFLAC_ASSERT(DRFLAC_FALSE); /* Should never hit this, but if we do it means our random number generation routine is wrong. */
176  }
177 
178  result = seek_test_pcm_frame(&libflac, pFlac, targetPCMFrame);
179  iteration += 1;
180  }
181 
182  /* We're done with our decoders. */
183  drflac_close(pFlac);
185 
186  if (result == DRFLAC_SUCCESS) {
187  printf(" Passed");
188  }
189 
190  return result;
191 }
192 
193 drflac_result seek_test_directory(const char* pDirectoryPath)
194 {
195  dr_file_iterator iteratorState;
196  dr_file_iterator* pFile;
197 
198  dr_printf_fixed(PROFILING_NAME_WIDTH, "%s", pDirectoryPath);
200  printf("\n");
201 
202  pFile = dr_file_iterator_begin(pDirectoryPath, &iteratorState);
203  while (pFile != NULL) {
204  drflac_result result;
205 
206  /* Skip directories for now, but we may want to look at doing recursive file iteration. */
207  if (!pFile->isDirectory) {
208  result = seek_test_file(pFile->absolutePath);
209  (void)result;
210 
211  printf("\n");
212  }
213 
214  pFile = dr_file_iterator_next(pFile);
215  }
216 
217  return DRFLAC_SUCCESS;
218 }
219 
221 {
222  drflac_result result = DRFLAC_SUCCESS;
223 
224  /* Directories. */
225  {
226  result = seek_test_directory("testvectors/flac/tests");
227  (void)result;
228  }
229 
230  return result;
231 }
232 
233 
234 drflac_result seek_profiling_drflac_and_close(drflac* pFlac, double* pProcessingTime)
235 {
236  drflac_result result = DRFLAC_SUCCESS;
237  int i;
238 
239  if (pFlac == NULL) {
240  result = DRFLAC_INVALID_ARGS;
241  goto done;
242  }
243 
244  if (pFlac->totalPCMFrameCount == 0) {
245  result = DRFLAC_INVALID_ARGS;
246  goto done;
247  }
248 
249  if (pProcessingTime != NULL) {
250  *pProcessingTime = 0;
251  }
252 
253  /* Seek back to the start to keep everything normalized. */
254  drflac_seek_to_pcm_frame(pFlac, 0);
255 
256  /* Random seek points based on a seed. */
257  dr_seed(1234);
258  /*dr_seed(4321);*/
259  for (i = 0; i < 100; ++i) {
260  double startTime;
261  double endTime;
262  dr_uint64 targetPCMFrame = dr_rand_range_u64(0, pFlac->totalPCMFrameCount);
263 
264  startTime = dr_timer_now();
265  {
266  drflac_seek_to_pcm_frame(pFlac, targetPCMFrame);
267  }
268  endTime = dr_timer_now();
269 
270  if (pProcessingTime != NULL) {
271  *pProcessingTime += (endTime - startTime);
272  }
273  }
274 
275 done:
276  drflac_close(pFlac);
277  return result;
278 }
279 
280 drflac_result seek_profiling_file__seek_table(const char* pFilePath, double* pProcessingTime)
281 {
282  drflac* pFlac;
283 
284  if (pFilePath == NULL) {
285  return DRFLAC_INVALID_ARGS;
286  }
287 
288  pFlac = drflac_open_file(pFilePath, NULL);
289  if (pFlac == NULL) {
290  return DRFLAC_ERROR;
291  }
292 
296 
297  return seek_profiling_drflac_and_close(pFlac, pProcessingTime);
298 }
299 
300 drflac_result seek_profiling_file__binary_search(const char* pFilePath, double* pProcessingTime)
301 {
302  drflac* pFlac;
303 
304  if (pFilePath == NULL) {
305  return DRFLAC_INVALID_ARGS;
306  }
307 
308  pFlac = drflac_open_file(pFilePath, NULL);
309  if (pFlac == NULL) {
310  return DRFLAC_ERROR;
311  }
312 
313  pFlac->_noSeekTableSeek = DRFLAC_TRUE;
316 
317  return seek_profiling_drflac_and_close(pFlac, pProcessingTime);
318 }
319 
320 drflac_result seek_profiling_file__brute_force(const char* pFilePath, double* pProcessingTime)
321 {
322  drflac* pFlac;
323 
324  if (pFilePath == NULL) {
325  return DRFLAC_INVALID_ARGS;
326  }
327 
328  pFlac = drflac_open_file(pFilePath, NULL);
329  if (pFlac == NULL) {
330  return DRFLAC_ERROR;
331  }
332 
333  pFlac->_noSeekTableSeek = DRFLAC_TRUE;
336 
337  return seek_profiling_drflac_and_close(pFlac, pProcessingTime);
338 }
339 
340 drflac_result seek_profiling_file(const char* pFilePath, profiling_state* pProfiling)
341 {
342  drflac_result result;
343 
344  profiling_state_init(pProfiling);
345 
346  /*
347  There are different seeking modes, and each one is profiled so that we can compare the results:
348  - Brute Force
349  - Binary Search
350  - Seek Table
351 
352  In order to keep the total run time fair, we can only include files with a seek table.
353  */
355 
356  /* Start off with the seek table version. If this fails we don't bother continuing. */
357 #if 1
358  result = seek_profiling_file__seek_table(pFilePath, &pProfiling->totalSeconds_SeekTable);
359  if (result != DRFLAC_SUCCESS) {
360  return result;
361  }
363 #else
365 #endif
366 
367 #if 1
368  result = seek_profiling_file__binary_search(pFilePath, &pProfiling->totalSeconds_BinarySearch);
369  if (result != DRFLAC_SUCCESS) {
370  return result;
371  }
373 #else
375 #endif
376 
377 #if 1
378  result = seek_profiling_file__brute_force(pFilePath, &pProfiling->totalSeconds_BruteForce);
379  if (result != DRFLAC_SUCCESS) {
380  return result;
381  }
383 #else
385 #endif
386 
387  return DRFLAC_SUCCESS;
388 }
389 
390 drflac_result seek_profiling_directory(const char* pDirectoryPath, profiling_state* pProfiling)
391 {
392  dr_file_iterator iteratorState;
393  dr_file_iterator* pFile;
394 
395  profiling_state_init(pProfiling);
396 
397  dr_printf_fixed(PROFILING_NAME_WIDTH, "%s", pDirectoryPath);
401  printf("\n");
402 
403  pFile = dr_file_iterator_begin(pDirectoryPath, &iteratorState);
404  while (pFile != NULL) {
405  drflac_result result;
406  profiling_state fileProfiling;
407 
408  /* Skip directories for now, but we may want to look at doing recursive file iteration. */
409  if (!pFile->isDirectory) {
410  result = seek_profiling_file(pFile->absolutePath, &fileProfiling);
411  if (result == DRFLAC_SUCCESS) {
412  *pProfiling = profiling_state_sum(pProfiling, &fileProfiling);
413  }
414 
415  printf("\n");
416  }
417 
418  pFile = dr_file_iterator_next(pFile);
419  }
420 
421  return DRFLAC_SUCCESS;
422 }
423 
425 {
426  drflac_result result = DRFLAC_SUCCESS;
427  profiling_state globalProfiling;
428 
429  profiling_state_init(&globalProfiling);
430 
431  /* Directories. */
432  {
433  profiling_state directoryProfiling;
434 
435  result = seek_profiling_directory("testvectors/flac/tests", &directoryProfiling);
436  if (result == DRFLAC_SUCCESS) {
437  globalProfiling = profiling_state_sum(&globalProfiling, &directoryProfiling);
438  }
439  }
440 
441  return result;
442 }
443 
444 
445 int main(int argc, char** argv)
446 {
447  drflac_result result = DRFLAC_SUCCESS;
448  drflac_bool32 doTesting = DRFLAC_TRUE;
449  drflac_bool32 doProfiling = DRFLAC_TRUE;
450 
451  /* This program has two main parts. The first is just a normal functionality test. The second is a profiling of the different seeking methods. */
452  if (dr_argv_is_set(argc, argv, "--onlyprofile")) {
453  doTesting = DRFLAC_FALSE;
454  }
455 
456  /* Exhaustive seek test. */
457  if (doTesting) {
458  printf("=======================================================================\n");
459  printf("SEEK TESTING\n");
460  printf("=======================================================================\n");
461  result = seek_test();
462  if (result != DRFLAC_SUCCESS) {
463  return (int)result; /* Don't continue if an error occurs during testing. */
464  }
465  printf("\n");
466  } else {
467  printf("=======================================================================\n");
468  printf("WARNING: Correctness Tests Disabled\n");
469  printf("=======================================================================\n");
470  }
471 
472  /* Profiling. */
473  if (doProfiling) {
474  printf("=======================================================================\n");
475  printf("SEEK PROFILING\n");
476  printf("=======================================================================\n");
477  result = seek_profiling();
478  printf("\n");
479  }
480 
481  /*getchar();*/
482  return (int)result;
483 }
DRFLAC_ZERO_MEMORY
#define DRFLAC_ZERO_MEMORY(p, sz)
Definition: porcupine/demo/c/pvrecorder/src/miniaudio/extras/miniaudio_split/miniaudio.c:51350
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
libflac::pcmFrameCount
drflac_uint64 pcmFrameCount
Definition: porcupine/demo/c/dr_libs/tests/flac/dr_flac_common.c:28
seek_profiling_drflac_and_close
drflac_result seek_profiling_drflac_and_close(drflac *pFlac, double *pProcessingTime)
Definition: rhino/demo/c/dr_libs/tests/flac/dr_flac_seeking.c:234
drflac_uint64
unsigned long long drflac_uint64
Definition: porcupine/demo/c/dr_libs/dr_flac.h:259
seek_profiling
drflac_result seek_profiling()
Definition: rhino/demo/c/dr_libs/tests/flac/dr_flac_seeking.c:424
seek_test
drflac_result seek_test()
Definition: rhino/demo/c/dr_libs/tests/flac/dr_flac_seeking.c:220
NULL
#define NULL
Definition: porcupine/demo/c/dr_libs/tests/external/miniaudio/extras/speex_resampler/thirdparty/resample.c:92
dr_flac_common.c
DRFLAC_ASSERT
#define DRFLAC_ASSERT(expression)
Definition: porcupine/demo/c/pvrecorder/src/miniaudio/extras/miniaudio_split/miniaudio.c:51335
dr_seed
void dr_seed(int seed)
Definition: porcupine/demo/c/dr_libs/tests/common/dr_common.c:822
drflac
Definition: porcupine/demo/c/dr_libs/dr_flac.h:688
seek_profiling_file
drflac_result seek_profiling_file(const char *pFilePath, profiling_state *pProfiling)
Definition: rhino/demo/c/dr_libs/tests/flac/dr_flac_seeking.c:340
PROFILING_NUMBER_MARGIN
#define PROFILING_NUMBER_MARGIN
Definition: rhino/demo/c/dr_libs/tests/flac/dr_flac_seeking.c:6
libflac_init_file
drflac_result libflac_init_file(const char *pFilePath, libflac *pDecoder)
Definition: porcupine/demo/c/dr_libs/tests/flac/dr_flac_common.c:148
libflac_seek_to_pcm_frame
drflac_bool32 libflac_seek_to_pcm_frame(libflac *pDecoder, drflac_uint64 targetPCMFrameIndex)
Definition: porcupine/demo/c/dr_libs/tests/flac/dr_flac_common.c:295
dr_file_iterator::isDirectory
dr_bool32 isDirectory
Definition: porcupine/demo/c/dr_libs/tests/common/dr_common.c:383
DRFLAC_ERROR
#define DRFLAC_ERROR
Definition: porcupine/demo/c/pvrecorder/src/miniaudio/extras/miniaudio_split/miniaudio.c:51358
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
dr_file_iterator
Definition: porcupine/demo/c/dr_libs/tests/common/dr_common.c:378
main
int main(int argc, char **argv)
Definition: rhino/demo/c/dr_libs/tests/flac/dr_flac_seeking.c:445
dr_timer_now
double dr_timer_now()
Definition: porcupine/demo/c/dr_libs/tests/common/dr_common.c:800
drflac::seekpointCount
drflac_uint32 seekpointCount
Definition: porcupine/demo/c/dr_libs/dr_flac.h:726
seek_profiling_file__seek_table
drflac_result seek_profiling_file__seek_table(const char *pFilePath, double *pProcessingTime)
Definition: rhino/demo/c/dr_libs/tests/flac/dr_flac_seeking.c:280
libflac
Definition: porcupine/demo/c/dr_libs/tests/flac/dr_flac_common.c:25
drflac::_noBinarySearchSeek
drflac_bool32 _noBinarySearchSeek
Definition: porcupine/demo/c/dr_libs/dr_flac.h:755
seek_test_directory
drflac_result seek_test_directory(const char *pDirectoryPath)
Definition: rhino/demo/c/dr_libs/tests/flac/dr_flac_seeking.c:193
profiling_state
Definition: porcupine/demo/c/dr_libs/tests/flac/dr_flac_seeking.c:8
DRFLAC_FALSE
#define DRFLAC_FALSE
Definition: porcupine/demo/c/dr_libs/dr_flac.h:272
drflac::_noBruteForceSeek
drflac_bool32 _noBruteForceSeek
Definition: porcupine/demo/c/dr_libs/dr_flac.h:756
dr_rand_range_u64
dr_uint64 dr_rand_range_u64(dr_uint64 lo, dr_uint64 hi)
Definition: porcupine/demo/c/dr_libs/tests/common/dr_common.c:869
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
drflac::_noSeekTableSeek
drflac_bool32 _noSeekTableSeek
Definition: porcupine/demo/c/dr_libs/dr_flac.h:754
drflac::currentPCMFrame
drflac_uint64 currentPCMFrame
Definition: porcupine/demo/c/dr_libs/dr_flac.h:734
dr_uint64
uint64_t dr_uint64
Definition: porcupine/demo/c/dr_libs/old/dr.h:67
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
seek_profiling_directory
drflac_result seek_profiling_directory(const char *pDirectoryPath, profiling_state *pProfiling)
Definition: rhino/demo/c/dr_libs/tests/flac/dr_flac_seeking.c:390
profiling_state_sum
profiling_state profiling_state_sum(const profiling_state *pA, const profiling_state *pB)
Definition: rhino/demo/c/dr_libs/tests/flac/dr_flac_seeking.c:20
drflac_open_file
DRFLAC_API drflac * drflac_open_file(const char *pFileName, const drflac_allocation_callbacks *pAllocationCallbacks)
Definition: porcupine/demo/c/pvrecorder/src/miniaudio/extras/miniaudio_split/miniaudio.c:56601
libflac::channels
drflac_uint32 channels
Definition: porcupine/demo/c/dr_libs/tests/flac/dr_flac_common.c:30
drflac_bool32
drflac_uint32 drflac_bool32
Definition: porcupine/demo/c/dr_libs/dr_flac.h:270
DRFLAC_TRUE
#define DRFLAC_TRUE
Definition: porcupine/demo/c/dr_libs/dr_flac.h:271
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
drflac_read_pcm_frames_s32
DRFLAC_API drflac_uint64 drflac_read_pcm_frames_s32(drflac *pFlac, drflac_uint64 framesToRead, drflac_int32 *pBufferOut)
Definition: porcupine/demo/c/pvrecorder/src/miniaudio/extras/miniaudio_split/miniaudio.c:57386
DRFLAC_INVALID_ARGS
#define DRFLAC_INVALID_ARGS
Definition: porcupine/demo/c/pvrecorder/src/miniaudio/extras/miniaudio_split/miniaudio.c:51359
libflac_uninit
void libflac_uninit(libflac *pDecoder)
Definition: porcupine/demo/c/dr_libs/tests/flac/dr_flac_common.c:215
seek_profiling_file__binary_search
drflac_result seek_profiling_file__binary_search(const char *pFilePath, double *pProcessingTime)
Definition: rhino/demo/c/dr_libs/tests/flac/dr_flac_seeking.c:300
profiling_state_init
void profiling_state_init(profiling_state *pProfiling)
Definition: rhino/demo/c/dr_libs/tests/flac/dr_flac_seeking.c:15
seek_test_file
drflac_result seek_test_file(const char *pFilePath)
Definition: rhino/demo/c/dr_libs/tests/flac/dr_flac_seeking.c:127
python.test_porcupine.argv
argv
Definition: test_porcupine.py:158
drflac_uint32
unsigned int drflac_uint32
Definition: porcupine/demo/c/dr_libs/dr_flac.h:246
PROFILING_NAME_WIDTH
#define PROFILING_NAME_WIDTH
Definition: rhino/demo/c/dr_libs/tests/flac/dr_flac_seeking.c:4
drflac_close
DRFLAC_API void drflac_close(drflac *pFlac)
Definition: porcupine/demo/c/pvrecorder/src/miniaudio/extras/miniaudio_split/miniaudio.c:56763
drflac::totalPCMFrameCount
drflac_uint64 totalPCMFrameCount
Definition: porcupine/demo/c/dr_libs/dr_flac.h:719
profiling_state::totalSeconds_BinarySearch
double totalSeconds_BinarySearch
Definition: porcupine/demo/c/dr_libs/tests/flac/dr_flac_seeking.c:11
drflac_seek_to_pcm_frame
DRFLAC_API drflac_bool32 drflac_seek_to_pcm_frame(drflac *pFlac, drflac_uint64 pcmFrameIndex)
Definition: porcupine/demo/c/pvrecorder/src/miniaudio/extras/miniaudio_split/miniaudio.c:58917
profiling_state::totalSeconds_BruteForce
double totalSeconds_BruteForce
Definition: porcupine/demo/c/dr_libs/tests/flac/dr_flac_seeking.c:10
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
PROFILING_NUMBER_WIDTH
#define PROFILING_NUMBER_WIDTH
Definition: rhino/demo/c/dr_libs/tests/flac/dr_flac_seeking.c:5
DRFLAC_SUCCESS
#define DRFLAC_SUCCESS
Definition: porcupine/demo/c/pvrecorder/src/miniaudio/extras/miniaudio_split/miniaudio.c:51357
drflac_int32
signed int drflac_int32
Definition: porcupine/demo/c/dr_libs/dr_flac.h:245
seek_profiling_file__brute_force
drflac_result seek_profiling_file__brute_force(const char *pFilePath, double *pProcessingTime)
Definition: rhino/demo/c/dr_libs/tests/flac/dr_flac_seeking.c:320
seek_test_pcm_frame
drflac_result seek_test_pcm_frame(libflac *pLibFlac, drflac *pFlac, drflac_uint64 targetPCMFrameIndex)
Definition: rhino/demo/c/dr_libs/tests/flac/dr_flac_seeking.c:31
profiling_state::totalSeconds_SeekTable
double totalSeconds_SeekTable
Definition: porcupine/demo/c/dr_libs/tests/flac/dr_flac_seeking.c:12
libflac_read_pcm_frames_s32
drflac_uint64 libflac_read_pcm_frames_s32(libflac *pDecoder, drflac_uint64 framesToRead, drflac_int32 *pBufferOut)
Definition: porcupine/demo/c/dr_libs/tests/flac/dr_flac_common.c:224
drflac_result
drflac_int32 drflac_result
Definition: porcupine/demo/c/pvrecorder/src/miniaudio/extras/miniaudio_split/miniaudio.c:51356
libflac::currentPCMFrame
drflac_uint64 currentPCMFrame
Definition: porcupine/demo/c/dr_libs/tests/flac/dr_flac_common.c:32


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