/* A simple and dumb decoder that does not even query the mpg123 output format. It shall get MPG123_NEW_FORMAT once, but after that data! Beware: It writes raw audio to standard out! */ #include #include #include #include void decode_track(mpg123_handle *mh); int main(int argc, char **argv) { int i; int err; mpg123_handle* mh; mpg123_init(); mh = mpg123_new(NULL, NULL); for(i=1; i 0) { sum += fill; write(STDOUT_FILENO, buf, fill); } } fprintf(stderr, "decoded bytes: %lli\n", (long long)sum); }