1
0
mirror of https://github.com/mon/2dxTools.git synced 2025-02-25 22:08:39 +01:00
2dxTools/2dxWavConvert.c

25 lines
472 B
C
Raw Normal View History

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;
}