diff options
author | Jordi Vilalta Prat | 2009-02-22 13:11:43 +0000 |
---|---|---|
committer | Jordi Vilalta Prat | 2009-02-22 13:11:43 +0000 |
commit | b5ce8d93200d60c3a752720300d77773750bf583 (patch) | |
tree | 77e1656645b26cb859c6ddb17843c73622880465 /engines/sci/sfx | |
parent | ac409a2ab7a15c08bde95f0647847dc71407ed88 (diff) | |
download | scummvm-rg350-b5ce8d93200d60c3a752720300d77773750bf583.tar.gz scummvm-rg350-b5ce8d93200d60c3a752720300d77773750bf583.tar.bz2 scummvm-rg350-b5ce8d93200d60c3a752720300d77773750bf583.zip |
Whitespace cleanup
svn-id: r38783
Diffstat (limited to 'engines/sci/sfx')
-rw-r--r-- | engines/sci/sfx/core.cpp | 4 | ||||
-rw-r--r-- | engines/sci/sfx/device/camd-midi.cpp | 2 | ||||
-rw-r--r-- | engines/sci/sfx/iterator.cpp | 38 | ||||
-rw-r--r-- | engines/sci/sfx/mixer/soft.cpp | 16 | ||||
-rw-r--r-- | engines/sci/sfx/pcm_device.cpp | 2 | ||||
-rw-r--r-- | engines/sci/sfx/seq/oss-adlib.cpp | 4 | ||||
-rw-r--r-- | engines/sci/sfx/sfx_iterator.h | 16 | ||||
-rw-r--r-- | engines/sci/sfx/sfx_iterator_internal.h | 3 | ||||
-rw-r--r-- | engines/sci/sfx/sfx_songlib.h | 2 | ||||
-rw-r--r-- | engines/sci/sfx/softseq/SN76496.cpp | 2 | ||||
-rw-r--r-- | engines/sci/sfx/softseq/fluidsynth.cpp | 2 | ||||
-rw-r--r-- | engines/sci/sfx/softseq/opl2.cpp | 6 | ||||
-rw-r--r-- | engines/sci/sfx/softseq/pcspeaker.cpp | 2 |
13 files changed, 44 insertions, 55 deletions
diff --git a/engines/sci/sfx/core.cpp b/engines/sci/sfx/core.cpp index 4d40d002ca..540750538f 100644 --- a/engines/sci/sfx/core.cpp +++ b/engines/sci/sfx/core.cpp @@ -731,7 +731,7 @@ void sfx_song_set_status(sfx_state_t *self, song_handle_t handle, int status) { } void sfx_song_set_fade(sfx_state_t *self, song_handle_t handle, - fade_params_t *params) { + fade_params_t *params) { #ifdef DEBUG_SONG_API static const char *stopmsg[] = {"??? Should not happen", "Do not stop afterwards", "Stop afterwards"}; #endif @@ -808,7 +808,7 @@ static const int MIDI_cmdlen[16] = {0, 0, 0, 0, 0, 0, 0, 0, static const song_handle_t midi_send_base = 0xffff0000; int sfx_send_midi(sfx_state_t *self, song_handle_t handle, int channel, - int command, int arg1, int arg2) { + int command, int arg1, int arg2) { byte buffer[5]; tell_synth_func *tell = sfx_get_player_tell_func(); diff --git a/engines/sci/sfx/device/camd-midi.cpp b/engines/sci/sfx/device/camd-midi.cpp index 307e215a50..d06324aaed 100644 --- a/engines/sci/sfx/device/camd-midi.cpp +++ b/engines/sci/sfx/device/camd-midi.cpp @@ -54,7 +54,7 @@ static struct MidiNode *midi_node = NULL; #define ABORT(m) { \ if (CamdBase) \ - IExec->CloseLibrary(CamdBase); \ + IExec->CloseLibrary(CamdBase); \ sciprintf("[SFX] CAMD driver: "); \ sciprintf(m); \ sciprintf("\n"); \ diff --git a/engines/sci/sfx/iterator.cpp b/engines/sci/sfx/iterator.cpp index baa6572658..90964ee9c6 100644 --- a/engines/sci/sfx/iterator.cpp +++ b/engines/sci/sfx/iterator.cpp @@ -115,13 +115,11 @@ static inline int _parse_ticks(byte *data, int *offset_p, int size) { static int _sci0_read_next_command(sci0_song_iterator_t *self, - unsigned char *buf, int *result); + unsigned char *buf, int *result); static int _sci0_get_pcm_data(sci0_song_iterator_t *self, - sfx_pcm_config_t *format, - int *xoffset, - unsigned int *xsize); + sfx_pcm_config_t *format, int *xoffset, unsigned int *xsize); #define PARSE_FLAG_LOOPS_UNLIMITED (1 << 0) /* Unlimited # of loops? */ #define PARSE_FLAG_PARAMETRIC_CUE (1 << 1) /* Assume that cues take an additional "cue value" argument */ @@ -144,9 +142,8 @@ void _reset_synth_channels(base_song_iterator_t *self, song_iterator_channel_t * } } -static int _parse_sci_midi_command(base_song_iterator_t *self, unsigned char *buf, int *result, - song_iterator_channel_t *channel, - int flags) { +static int _parse_sci_midi_command(base_song_iterator_t *self, unsigned char *buf, + int *result, song_iterator_channel_t *channel, int flags) { unsigned char cmd; int paramsleft; int midi_op; @@ -354,8 +351,7 @@ static int _parse_sci_midi_command(base_song_iterator_t *self, unsigned char *bu } static int _sci_midi_process_state(base_song_iterator_t *self, unsigned char *buf, int *result, - song_iterator_channel_t *channel, - int flags) { + song_iterator_channel_t *channel, int flags) { CHECK_FOR_END(0); switch (channel->state) { @@ -449,7 +445,7 @@ static int _sci_midi_process_state(base_song_iterator_t *self, unsigned char *bu } static inline int _sci_midi_process(base_song_iterator_t *self, unsigned char *buf, int *result, - song_iterator_channel_t *channel, int flags) { + song_iterator_channel_t *channel, int flags) { return _sci_midi_process_state(self, buf, result, channel, flags); @@ -473,9 +469,7 @@ static inline int _sci0_header_magic_p(unsigned char *data, int offset, int size static int _sci0_get_pcm_data(sci0_song_iterator_t *self, - sfx_pcm_config_t *format, - int *xoffset, - unsigned int *xsize) { + sfx_pcm_config_t *format, int *xoffset, unsigned int *xsize) { int tries = 2; int found_it = 0; unsigned char *pcm_data; @@ -634,7 +628,7 @@ static int _sci0_get_timepos(sci0_song_iterator_t *self) { } static void _base_init_channel(song_iterator_channel_t *channel, int id, int offset, - int end) { + int end) { channel->playmask = PLAYMASK_NONE; /* Disable all channels */ channel->id = id; channel->notes_played = 0; @@ -976,7 +970,7 @@ static sfx_pcm_feed_t *_sci1_get_pcm(sci1_song_iterator_t *self) { } static int _sci1_process_next_command(sci1_song_iterator_t *self, - unsigned char *buf, int *result) { + unsigned char *buf, int *result) { int retval = -42; /* Shouldn't happen, but gcc doesn't agree */ int chan; @@ -1300,7 +1294,7 @@ song_iterator_t *new_cleanup_iterator(unsigned int channels) { /**********************************/ static int _ff_read_next_command(fast_forward_song_iterator_t *self, - byte *buf, int *result) { + byte *buf, int *result) { int rv; if (self->delta <= 0) @@ -1328,7 +1322,7 @@ static sfx_pcm_feed_t *_ff_check_pcm(fast_forward_song_iterator_t *self) { } static song_iterator_t *_ff_handle_message(fast_forward_song_iterator_t *self, - song_iterator_message_t msg) { + song_iterator_message_t msg) { if (msg.recipient == _SIMSG_PLASTICWRAP) switch (msg.type) { @@ -1417,7 +1411,7 @@ song_iterator_t *new_fast_forward_iterator(song_iterator_t *capsit, int delta) { static int _tee_read_next_command(tee_song_iterator_t *it, unsigned char *buf, - int *result) { + int *result) { static int ready_masks[2] = {TEE_LEFT_READY, TEE_RIGHT_READY}; static int active_masks[2] = {TEE_LEFT_ACTIVE, TEE_RIGHT_ACTIVE}; static int pcm_masks[2] = {TEE_LEFT_PCM, TEE_RIGHT_PCM}; @@ -1648,7 +1642,7 @@ static void _tee_free(tee_song_iterator_t *it) { #endif static void songit_tee_death_notification(tee_song_iterator_t *self, - song_iterator_t *corpse) { + song_iterator_t *corpse) { if (corpse == self->children[TEE_LEFT].it) { self->status &= ~TEE_LEFT_ACTIVE; self->children[TEE_LEFT].it = NULL; @@ -1933,8 +1927,7 @@ song_iterator_t *songit_clone(song_iterator_t *it, int delta) { } void song_iterator_add_death_listener(song_iterator_t *it, - void *client, - void (*notify)(void *self, void *notifier)) { + void *client, void (*notify)(void *self, void *notifier)) { if (it->death_listeners_nr >= SONGIT_MAX_LISTENERS) { error("FATAL: Too many death listeners for song iterator"); } @@ -1945,8 +1938,7 @@ void song_iterator_add_death_listener(song_iterator_t *it, it->death_listeners_nr++; } -void song_iterator_remove_death_listener(song_iterator_t *it, - void *client) { +void song_iterator_remove_death_listener(song_iterator_t *it, void *client) { int i; for (i = 0; i < it->death_listeners_nr; i++) { if (it->death_listeners[i].self == client) { diff --git a/engines/sci/sfx/mixer/soft.cpp b/engines/sci/sfx/mixer/soft.cpp index e0450e578f..209fcf0633 100644 --- a/engines/sci/sfx/mixer/soft.cpp +++ b/engines/sci/sfx/mixer/soft.cpp @@ -434,16 +434,16 @@ static inline int mix_compute_buf_len(sfx_pcm_mixer_t *self, int *skip_frames) if (P->delta_observations > MAX_DELTA_OBSERVATIONS) P->delta_observations = MAX_DELTA_OBSERVATIONS; - /* /\* Disabled, broken *\/ */ - /* if (0 && P->delta_observations > MIN_DELTA_OBSERVATIONS) { /\* Start improving after a while *\/ */ - /* int diff = self->dev->conf.rate - P->max_delta; */ + /* /\* Disabled, broken *\/ */ + /* if (0 && P->delta_observations > MIN_DELTA_OBSERVATIONS) { /\* Start improving after a while *\/ */ + /* int diff = self->dev->conf.rate - P->max_delta; */ - /* /\* log-approximate P->max_delta over time *\/ */ - /* recommended_frames = P->max_delta + */ - /* ((diff * MIN_DELTA_OBSERVATIONS) / P->delta_observations); */ + /* /\* log-approximate P->max_delta over time *\/ */ + /* recommended_frames = P->max_delta + */ + /* ((diff * MIN_DELTA_OBSERVATIONS) / P->delta_observations); */ /* /\* WTF? *\/ */ - /* } else */ - /* recommended_frames = self->dev->buf_size; /\* Initially, keep the buffer full *\/ */ + /* } else */ + /* recommended_frames = self->dev->buf_size; /\* Initially, keep the buffer full *\/ */ #if (DEBUG >= 1) sciprintf("[soft-mixer] played since last time: %d, recommended: %d, free: %d\n", diff --git a/engines/sci/sfx/pcm_device.cpp b/engines/sci/sfx/pcm_device.cpp index a0f590ee82..5934b76b21 100644 --- a/engines/sci/sfx/pcm_device.cpp +++ b/engines/sci/sfx/pcm_device.cpp @@ -56,7 +56,7 @@ static int pcmout_scummvm_init(sfx_pcm_device_t *self) { } static int pcmout_scummvm_output(sfx_pcm_device_t *self, byte *buf, int count, - sfx_timestamp_t *timestamp) { + sfx_timestamp_t *timestamp) { byte *__buf = new byte[count * pcmout_scummvm_framesize]; diff --git a/engines/sci/sfx/seq/oss-adlib.cpp b/engines/sci/sfx/seq/oss-adlib.cpp index f1c7bbf1b9..2222544781 100644 --- a/engines/sci/sfx/seq/oss-adlib.cpp +++ b/engines/sci/sfx/seq/oss-adlib.cpp @@ -176,7 +176,7 @@ adlib_start_note(int chn, int note, int velocity) { static int midi_adlib_open(int data_length, byte *data_ptr, int data2_length, - byte *data2_ptr, void *seq) { + byte *data2_ptr, void *seq) { int nrdevs, i, n; struct synth_info info; struct sbi_instrument sbi; @@ -357,7 +357,7 @@ sfx_sequencer_t sfx_sequencer_oss_adlib = { 003, /* patch.003 */ SFX_SEQ_PATCHFILE_NONE, 0x04, /* playflag */ - 0, /* do not play channel 9 */ + 0, /* do not play channel 9 */ ADLIB_VOICES, /* Max polyphony */ 0 /* Does not require any write-ahead by its own */ }; diff --git a/engines/sci/sfx/sfx_iterator.h b/engines/sci/sfx/sfx_iterator.h index 0203159a49..4ddef7f111 100644 --- a/engines/sci/sfx/sfx_iterator.h +++ b/engines/sci/sfx/sfx_iterator.h @@ -109,7 +109,7 @@ struct song_iterator_message_t { #define INHERITS_SONG_ITERATOR \ songit_id_t ID; \ uint16 channel_mask; \ - fade_params_t fade; \ + fade_params_t fade; \ unsigned int flags; \ int priority; \ int (*next) (song_iterator_t *self, unsigned char *buf, int *buf_size); \ @@ -117,10 +117,10 @@ struct song_iterator_message_t { song_iterator_t * (* handle_message)(song_iterator_t *self, song_iterator_message_t msg); \ void (*init) (song_iterator_t *self); \ void (*cleanup) (song_iterator_t *self); \ - int (*get_timepos) (song_iterator_t *self); \ + int (*get_timepos) (song_iterator_t *self); \ listener_t death_listeners[SONGIT_MAX_LISTENERS]; \ int death_listeners_nr \ - + #define SONGIT_MAX_LISTENERS 2 struct song_iterator_t { @@ -208,8 +208,7 @@ struct song_iterator_t { ** in the song-player thread. */ void song_iterator_add_death_listener(song_iterator_t *it, - void *client, - void (*notify)(void *self, void *notifier)); + void *client, void (*notify)(void *self, void *notifier)); /* Adds a death listener to a song iterator ** Parameters: (song_iterator_t *) it: The iterator to add to ** (void *) client: The object wanting to be notified @@ -220,8 +219,7 @@ void song_iterator_add_death_listener(song_iterator_t *it, ** Death listeners are NOT cloned. */ -void song_iterator_remove_death_listener(song_iterator_t *it, - void *client); +void song_iterator_remove_death_listener(song_iterator_t *it, void *client); /* Removes a death listener from a song iterator ** Parameters: (song_iterator_t *) it: The iterator to modify ** (void *) client: The object no longer wanting to be notified @@ -298,7 +296,7 @@ void songit_free(song_iterator_t *it); */ song_iterator_message_t songit_make_message(songit_id_t id, - int recipient_class, int type, int a1, int a2); + int recipient_class, int type, int a1, int a2); /* Create a song iterator message ** Parameters: (songit_id_t) id: song ID the message is targetted to ** (int) recipient_class: Message recipient class @@ -308,7 +306,7 @@ song_iterator_message_t songit_make_message(songit_id_t id, */ song_iterator_message_t songit_make_ptr_message(songit_id_t id, - int recipient_class, int type, void * a1, int a2); + int recipient_class, int type, void * a1, int a2); /* Create a song iterator message, wherein the first parameter is a pointer ** Parameters: (songit_id_t) id: song ID the message is targetted to ** (int) recipient_class: Message recipient class diff --git a/engines/sci/sfx/sfx_iterator_internal.h b/engines/sci/sfx/sfx_iterator_internal.h index ba6f79742c..1898b34ca1 100644 --- a/engines/sci/sfx/sfx_iterator_internal.h +++ b/engines/sci/sfx/sfx_iterator_internal.h @@ -220,8 +220,7 @@ struct tee_song_iterator_t { sfx_pcm_feed_t *sfx_iterator_make_feed(byte *base_data, int offset, - int size, - sfx_pcm_config_t conf); + int size, sfx_pcm_config_t conf); /* Generates a feed for a song iterator ** Parameters: (byte *) base_data: A refcounted memory chunk containing ** (among other things) PCM data diff --git a/engines/sci/sfx/sfx_songlib.h b/engines/sci/sfx/sfx_songlib.h index c1683a2f47..bf68697d0b 100644 --- a/engines/sci/sfx/sfx_songlib.h +++ b/engines/sci/sfx/sfx_songlib.h @@ -177,7 +177,7 @@ GTimeVal song_next_wakeup_time(GTimeVal *lastslept, long ticks); */ void song_lib_set_restore_behavior(songlib_t songlib, song_handle_t handle, - RESTORE_BEHAVIOR action); + RESTORE_BEHAVIOR action); /* Determines what should be done with the song "handle" when ** restoring it from a saved game. ** Parameters: (songlib_t) songlib: The library that contains the song diff --git a/engines/sci/sfx/softseq/SN76496.cpp b/engines/sci/sfx/softseq/SN76496.cpp index 2295eceb7b..f9ecd12aaf 100644 --- a/engines/sci/sfx/softseq/SN76496.cpp +++ b/engines/sci/sfx/softseq/SN76496.cpp @@ -51,7 +51,7 @@ static int SN76496_set_option(sfx_softseq_t *self, const char *name, const char } static int SN76496_init(sfx_softseq_t *self, byte *patch, int patch_len, byte *patch2, - int patch2_len) { + int patch2_len) { return SFX_OK; } diff --git a/engines/sci/sfx/softseq/fluidsynth.cpp b/engines/sci/sfx/softseq/fluidsynth.cpp index 17fcef34ba..ab73c381bd 100644 --- a/engines/sci/sfx/softseq/fluidsynth.cpp +++ b/engines/sci/sfx/softseq/fluidsynth.cpp @@ -156,7 +156,7 @@ fluidsynth_poll(sfx_softseq_t *self, byte *dest, int count) { static int fluidsynth_init(sfx_softseq_t *self, byte *data_ptr, int data_length, - byte *data2_ptr, int data2_length) { + byte *data2_ptr, int data2_length) { int sfont_id; double min, max; diff --git a/engines/sci/sfx/softseq/opl2.cpp b/engines/sci/sfx/softseq/opl2.cpp index 1229000283..7dbe423eaa 100644 --- a/engines/sci/sfx/softseq/opl2.cpp +++ b/engines/sci/sfx/softseq/opl2.cpp @@ -173,8 +173,8 @@ static inline int opl_write(int a, int v) { /* static inline uint8 opl_read (int a) { - OPLWrite (ym3812_L, 0x388, a); - return OPLRead (ym3812_L, 0x389); + OPLWrite (ym3812_L, 0x388, a); + return OPLRead (ym3812_L, 0x389); } */ @@ -514,7 +514,7 @@ static void opl2_poll(sfx_softseq_t *self, byte *dest, int count) { } static int opl2_init(sfx_softseq_t *self, byte *data_ptr, int data_length, byte *data2_ptr, - int data2_length) { + int data2_length) { int i; /* load up the patch.003 file, parse out the instruments */ diff --git a/engines/sci/sfx/softseq/pcspeaker.cpp b/engines/sci/sfx/softseq/pcspeaker.cpp index 8d9b6e3da8..82486c28a1 100644 --- a/engines/sci/sfx/softseq/pcspeaker.cpp +++ b/engines/sci/sfx/softseq/pcspeaker.cpp @@ -45,7 +45,7 @@ static int sps_set_option(sfx_softseq_t *self, const char *name, const char *val } static int sps_init(sfx_softseq_t *self, byte *patch, int patch_len, byte *patch2, - int patch2_len) { + int patch2_len) { return SFX_OK; } |