Mercurial > spc_convert
comparison convert/spc_convert.c @ 8:a37863126396
reordered error messages
author | Robert McIntyre <rlm@mit.edu> |
---|---|
date | Fri, 21 Oct 2011 07:26:53 -0700 |
parents | 95cdedd01422 |
children |
comparison
equal
deleted
inserted
replaced
7:6a2c890c22db | 8:a37863126396 |
---|---|
15 SPC_Filter* filter = spc_filter_new(); | 15 SPC_Filter* filter = spc_filter_new(); |
16 if ( !snes_spc || !filter ) error( "Out of memory" ); | 16 if ( !snes_spc || !filter ) error( "Out of memory" ); |
17 | 17 |
18 int seconds = atoi(argv[2]); | 18 int seconds = atoi(argv[2]); |
19 | 19 |
20 if (argc != 7) { | |
21 error("Incorrect Arguments\n Sample invocation: \n spc_convert -s 5 -i input.spc -o output.wav"); | |
22 } | |
23 | |
20 if (seconds <=0){ | 24 if (seconds <=0){ |
21 error("seconds must be positive."); | 25 error("seconds must be positive."); |
22 } | 26 } |
23 | 27 |
24 if (argc != 7) { | |
25 error("Incorrect Arguments\n Sample invocation: \n spc_convert -s 5 -i input.spc -o output.wav"); | |
26 } | |
27 /* Load SPC */ | 28 /* Load SPC */ |
28 { | 29 { |
29 /* Load file into memory */ | 30 /* Load file into memory */ |
30 long spc_size; | 31 long spc_size; |
31 void* spc = load_file( argv[4] , &spc_size ); | 32 void* spc = load_file( argv[4] , &spc_size ); |