search for: bytesconsumed

Displaying 1 result from an estimated 1 matches for "bytesconsumed".

2006 Oct 09
1
Vorbis primitive API examples (LONG)
.../ #include <io.h> #include <fcntl.h> #endif #if defined(__MACOS__) && defined(__MWERKS__) #include <console.h> /* CodeWarrior's Mac "command-line" support */ #endif #define dprintf(...) fprintf(stderr, __VA_ARGS__) #define BCHUNKSIZE 8192 static long bytesConsumed = 0; // FIXME: This is one of the places that can throw errors int grabData(ogg_sync_state *oy) { unsigned char* bb = ogg_sync_bufferin(oy, BCHUNKSIZE); long bytesRead = fread(bb, 1, BCHUNKSIZE, stdin); dprintf("Consumed: %ld bytes\n", bytesRead); if (bytesRead == 0) { // F...