From 7022a2febf313c2b2dcc269988e87265d721ec9e Mon Sep 17 00:00:00 2001 From: Angel Ortega Date: Mon, 21 Jan 2008 09:10:03 +0100 Subject: [PATCH] Use const in ss_song.c where possible. --- ahxm.h | 2 +- ss_song.c | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/ahxm.h b/ahxm.h index e6d7bb1..b644c90 100644 --- a/ahxm.h +++ b/ahxm.h @@ -351,7 +351,7 @@ int song_test_measure_boundary(double ev_time, int num, int den, int line); /* in ss_song.c */ -int ss_song_render(int skip_secs, char * driver, char * devfile); +int ss_song_render(int skip_secs, const char * driver, const char * devfile); /* in midi_song.c */ diff --git a/ss_song.c b/ss_song.c index 16bf92d..d663253 100644 --- a/ss_song.c +++ b/ss_song.c @@ -49,7 +49,7 @@ struct ss_ins ss_song_ins[SS_MAX_INSTRUMENTS]; Code ********************/ -static struct song_ev * add_ss_ev(struct song_ev *e) +static struct song_ev * add_ss_ev(const struct song_ev *e) /* adds a softsynth song event */ { return copy_event(&ss_song, &n_ss_ev, e); @@ -259,7 +259,7 @@ static void ss_song_convert_events(int *n_channels) } -static struct song_ev *process_this_frame_events(struct song_ev *e, int skip_frames) +static const struct song_ev *process_this_frame_events(const struct song_ev *e, int skip_frames) /* process the events attached to this frame */ { static double tempo = 120.0; @@ -527,13 +527,13 @@ static struct song_ev *process_this_frame_events(struct song_ev *e, int skip_fra } -int ss_song_render(int skip_secs, char *driver, char *devfile) +int ss_song_render(int skip_secs, const char *driver, const char *devfile) { int n, i = 0; sample_t output[SS_MAX_CHANNELS]; int skip_frames; int n_channels; - struct song_ev *e = NULL; + const struct song_ev *e = NULL; /* convert the song to ss events */ ss_song_convert_events(&n_channels); -- 2.11.4.GIT