2017-03-23 22:36:32 +10:00
|
|
|
#include <stdlib.h>
|
|
|
|
#include <stdio.h>
|
|
|
|
#include <stdint.h>
|
2017-03-23 22:46:35 +10:00
|
|
|
#include <string.h>
|
2017-03-23 22:36:32 +10:00
|
|
|
|
|
|
|
#include "shared.h"
|
|
|
|
#include "2dxWav.h"
|
|
|
|
|
|
|
|
int main(int argc, char * argv[])
|
|
|
|
{
|
2017-03-23 22:46:35 +10:00
|
|
|
if(argc != 3 && argc != 4) {
|
|
|
|
printf("2dxWavConvert infile outwav [preview]\n");
|
2017-03-23 22:36:32 +10:00
|
|
|
return 1;
|
|
|
|
}
|
2017-03-23 22:46:35 +10:00
|
|
|
int preview = 0;
|
|
|
|
if(argc == 4 && !strcmp("preview", argv[3]))
|
|
|
|
preview = 1;
|
2017-03-23 22:36:32 +10:00
|
|
|
|
2017-03-23 22:46:35 +10:00
|
|
|
if(convert_wav(argv[1], argv[2], preview)) {
|
2017-03-23 22:36:32 +10:00
|
|
|
printf("Conversion failed!\n");
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
return 0;
|
|
|
|
}
|