Permalink
Browse files

Set rate before outbuf_init

Fixes failing tests in dsk case, due to rate mismatch.
  • Loading branch information...
raphlinus committed Oct 23, 2017
1 parent 07e57f3 commit ca608e9ca29f72c9b74e0566b7d5aa178f5fbac3
Showing with 2 additions and 1 deletion.
  1. +2 −1 c2t-96h.c
@@ -582,6 +582,8 @@ int main(int argc, char **argv)
return 0;
}

if(dsk)
rate = 48000;
outbuf_init(&buf, rate);

// write out code
@@ -1107,7 +1109,6 @@ int main(int argc, char **argv)

registerevent(events,buf.length,"770Hz Preamble + Sync Bit");

rate = 48000;
appendtone(&buf,770,4.0+tape,0);
appendtone(&buf,2500,0,0.5);
appendtone(&buf,2000,0,0.5);

0 comments on commit ca608e9

Please sign in to comment.