From 4156eb0f5306b9f799c374b9f12f08f2544811e5 Mon Sep 17 00:00:00 2001 From: angel Date: Fri, 3 Feb 2006 07:07:04 +0000 Subject: [PATCH] Changed ss_load_wav_file() to accept the first_channel and skip_channels arguments. git-svn-id: file:///home/angel/tmp/svn-triptico/ahxm/trunk@862 c87de0a0-a11c-0410-a1e5-866214bc28b2 --- annhell.h | 3 ++- ss_input.c | 8 +++++++- ss_song.c | 3 ++- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/annhell.h b/annhell.h index 552e29e..fb60a04 100644 --- a/annhell.h +++ b/annhell.h @@ -464,7 +464,8 @@ int cue_file_song_info(int frame, char * author, char * name); void load_pcm_wave(FILE * f, struct ss_wave * w); struct ss_wave * ss_load_wav_file(char * file, double base_freq, double min_freq, double max_freq, - double loop_start, double loop_end); + double loop_start, double loop_end, + int first_channel, int skip_channels); int ss_load_pat_file(struct ss_ins * i, char * file); /* in ss_eff.c */ diff --git a/ss_input.c b/ss_input.c index daf2976..29e8b7a 100644 --- a/ss_input.c +++ b/ss_input.c @@ -115,12 +115,15 @@ void load_pcm_wave(FILE * f, struct ss_wave * w) * @max_freq: maximum frequency * @loop_start: frame number of loop start (-1, no loop) * @loop_end: frame number of loop end (-1, end of wave) + * @first_channel: first channel to start spreading + * @skip_channels: channels to skip when spreading * * Loads a file in .WAV format. */ struct ss_wave * ss_load_wav_file(char * file, double base_freq, double min_freq, double max_freq, - double loop_start, double loop_end) + double loop_start, double loop_end, + int first_channel, int skip_channels) { FILE * f; char dummydata[256]; @@ -199,6 +202,9 @@ struct ss_wave * ss_load_wav_file(char * file, else w->loop_end = loop_end; + w->first_channel = first_channel; + w->skip_channels = skip_channels; + /* fill the info needed for paging */ w->filename = strdup(file); w->f_pos = ftell(f); diff --git a/ss_song.c b/ss_song.c index 6f193c8..fa8e170 100644 --- a/ss_song.c +++ b/ss_song.c @@ -785,7 +785,8 @@ int ss_song_render(int skip_secs) ss_note_frequency(e->ss_wav.base), ss_note_frequency(e->ss_wav.min), ss_note_frequency(e->ss_wav.max), - e->ss_wav.loop_start, e->ss_wav.loop_end); + e->ss_wav.loop_start, e->ss_wav.loop_end, + 0, 0); /* fail if can't open wav */ if(w == NULL) -- 2.11.4.GIT