Commit 8b2558b5 authored by Mans Rullgard's avatar Mans Rullgard

mqascan: search for mqa stream bit position

parent e46fe21f
......@@ -332,8 +332,8 @@ static int scan_file(const char *name, int start, int mqabit)
{
SNDFILE *file;
SF_INFO fmt;
int i;
bitnum = 0;
abspos = 0;
memset(&fmt, 0, sizeof(fmt));
......@@ -349,18 +349,25 @@ static int scan_file(const char *name, int start, int mqabit)
return -1;
}
if (start)
sf_seek(file, start, SEEK_SET);
print_verbosity(verbosity);
if (!setjmp(eofjmp)) {
init_bits_sf(&br, file, mqabit);
br.msb = 0;
br.get_bits_cb = get_bits_cb;
br.eof_cb = eof_cb;
if (!find_mqa_sync(&br))
for (i = mqabit; i < 16; i++) {
sf_seek(file, start, SEEK_SET);
init_bits_sf(&br, file, i);
br.msb = 0;
br.get_bits_cb = get_bits_cb;
br.eof_cb = eof_cb;
bitnum = 0;
if (!find_mqa_sync(&br))
break;
}
if (i < 16) {
printf("%08x: MQA signature at bit %d\n", bitnum, i);
scan_mqa(&br);
}
}
print_end();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment