From 78efc99ad38ff7d00da545c57449e164ac026d25 Mon Sep 17 00:00:00 2001 From: kramm Date: Wed, 12 Oct 2005 18:30:14 +0000 Subject: [PATCH] changed argument order in read_wav() --- lib/wav.c | 4 ++-- lib/wav.h | 4 ++-- src/swfc.c | 4 ++-- src/wav2swf.c | 10 +++++----- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/lib/wav.c b/lib/wav.c index 9afd6b1..31f24ca 100644 --- a/lib/wav.c +++ b/lib/wav.c @@ -45,7 +45,7 @@ int getWAVBlock(FILE*fi, struct WAVBlock*block) return 1; } -int wav_read(char* filename, struct WAV*wav) +int wav_read(struct WAV*wav, char* filename) { FILE*fi = fopen(filename, "rb"); unsigned char b[16]; @@ -113,7 +113,7 @@ int wav_read(char* filename, struct WAV*wav) return 1; } -int wav_write(char*filename, struct WAV*wav) +int wav_write(struct WAV*wav, char*filename) { FILE*fi = fopen(filename, "wb"); char*b="RIFFWAVEfmt \x10\0\0\0data"; diff --git a/lib/wav.h b/lib/wav.h index 466098f..4a3126c 100644 --- a/lib/wav.h +++ b/lib/wav.h @@ -19,8 +19,8 @@ struct WAV { unsigned int size; }; -int wav_read(char* filename, struct WAV*wav); -int wav_write(char*filename, struct WAV*wav); +int wav_read(struct WAV*wav, char* filename); +int wav_write(struct WAV*wav, char*filename); void wav_print(struct WAV*wav); int wav_convert2mono(struct WAV*src, struct WAV*dest, int rate); diff --git a/src/swfc.c b/src/swfc.c index 301f542..4313903 100644 --- a/src/swfc.c +++ b/src/swfc.c @@ -1209,9 +1209,9 @@ void s_sound(char*name, char*filename) unsigned blocksize = 1152; int is_mp3 = 0; - if(readWAV(filename, &wav)) { + if(wav_read(&wav, filename)) { int t; - convertWAV2mono(&wav, &wav2, 44100); + wav_convert2mono(&wav, &wav2, 44100); samples = (U16*)wav2.data; numsamples = wav2.size/2; free(wav.data); diff --git a/src/wav2swf.c b/src/wav2swf.c index f6d3b2c..153f8f1 100644 --- a/src/wav2swf.c +++ b/src/wav2swf.c @@ -24,7 +24,7 @@ #include "../lib/rfxswf.h" #include "../lib/log.h" #include "../lib/args.h" -#include "wav.h" +#include "../lib/wav.h" char * filename = 0; char * outputname = "output.swf"; @@ -227,14 +227,14 @@ int main (int argc,char ** argv) exit(1); } - if(!readWAV(filename, &wav)) + if(!wav_read(&wav, filename)) { msg(" Error reading %s", filename); exit(1); } - convertWAV2mono(&wav,&wav2, samplerate); - //printWAVInfo(&wav); - //printWAVInfo(&wav2); + wav_convert2mono(&wav,&wav2, samplerate); + //wav_print(&wav); + //wav_print(&wav2); samples = (U16*)wav2.data; numsamples = wav2.size/2; -- 1.7.10.4