3 #define DR_OPUS_IMPLEMENTATION
4 #include "../../wip/dr_opus.h"
5 #include "../common/dr_common.c"
23 #ifdef DR_OPUS_DEBUGGING
24 int main_debugging(
int argc,
char**
argv);
40 if (pFileData ==
NULL) {
60 while (runningPos < fileSize) {
65 memcpy(&packetSize, pRunningData8 + 0, 4);
66 memcpy(&rangeState, pRunningData8 + 4, 4);
68 packetSize = dropus__be2host_32(packetSize);
69 rangeState = dropus__be2host_32(rangeState);
75 if ((runningPos + packetSize) > fileSize) {
76 printf(
"WARNING: Ran out of data before the end of the file.\n");
83 printf(
"Failed to decode packet %d\n", iPacket);
88 pRunningData8 += packetSize;
89 runningPos += packetSize;
104 while (pFile !=
NULL) {
160 #ifdef DR_OPUS_DEBUGGING
161 main_debugging(argc,
argv);
186 #ifdef DR_OPUS_DEBUGGING
187 int main_debugging(
int argc,
char**
argv)
191 while (pFile !=
NULL) {