#include #include #include #include typedef struct { char magic[4]; uint32_t size; char type[4]; } riff_t; typedef struct { char id[4]; uint32_t size; } chunk_t; typedef struct { uint32_t mf, prod, sp, mnote, mpitch, sfmt, sofs, nloops, sdata; } smpl_t; typedef struct { uint32_t id, type, start, end, fraction, count; } sloop_t; int main( int argc, char **argv ) { if ( argc < 2 ) return 1; FILE *fin; for ( int i=1; i