diff options
author | Paweł Kołodziejski | 2009-02-21 17:23:28 +0000 |
---|---|---|
committer | Paweł Kołodziejski | 2009-02-21 17:23:28 +0000 |
commit | f18d5500b1a3fc78c3190c8c2dbce8c6abf5095c (patch) | |
tree | f587a8190988b05a93df7464af5b19c676ebf7d1 /engines | |
parent | a0cc744aab81339653ad0b185cfb90bb90cf4410 (diff) | |
download | scummvm-rg350-f18d5500b1a3fc78c3190c8c2dbce8c6abf5095c.tar.gz scummvm-rg350-f18d5500b1a3fc78c3190c8c2dbce8c6abf5095c.tar.bz2 scummvm-rg350-f18d5500b1a3fc78c3190c8c2dbce8c6abf5095c.zip |
formating
svn-id: r38709
Diffstat (limited to 'engines')
-rw-r--r-- | engines/sci/sfx/mixer/soft.cpp | 39 | ||||
-rw-r--r-- | engines/sci/sfx/player/players.cpp | 3 | ||||
-rw-r--r-- | engines/sci/sfx/player/polled.cpp | 46 | ||||
-rw-r--r-- | engines/sci/sfx/seq/sequencers.cpp | 3 | ||||
-rw-r--r-- | engines/sci/sfx/softseq/SN76496.cpp | 27 | ||||
-rw-r--r-- | engines/sci/sfx/softseq/amiga.cpp | 42 | ||||
-rw-r--r-- | engines/sci/sfx/softseq/opl2.cpp | 24 | ||||
-rw-r--r-- | engines/sci/sfx/softseq/pcspeaker.cpp | 24 | ||||
-rw-r--r-- | engines/sci/sfx/softseq/softsequencers.cpp | 3 |
9 files changed, 71 insertions, 140 deletions
diff --git a/engines/sci/sfx/mixer/soft.cpp b/engines/sci/sfx/mixer/soft.cpp index 00468798c8..5dad9248e5 100644 --- a/engines/sci/sfx/mixer/soft.cpp +++ b/engines/sci/sfx/mixer/soft.cpp @@ -103,8 +103,7 @@ mix_init(sfx_pcm_mixer_t *self, sfx_pcm_device_t *device) { return SFX_OK; } -static inline unsigned int -gcd(unsigned int a, unsigned int b) { +static inline unsigned int gcd(unsigned int a, unsigned int b) { if (a == b) return a; @@ -119,8 +118,7 @@ gcd(unsigned int a, unsigned int b) { return gcd(b, a); } -static sfx_pcm_urat_t -urat(unsigned int nom, unsigned int denom) { +static sfx_pcm_urat_t urat(unsigned int nom, unsigned int denom) { sfx_pcm_urat_t rv; unsigned int g; @@ -137,8 +135,7 @@ urat(unsigned int nom, unsigned int denom) { return rv; } -static void -mix_subscribe(sfx_pcm_mixer_t *self, sfx_pcm_feed_t *feed) { +static void mix_subscribe(sfx_pcm_mixer_t *self, sfx_pcm_feed_t *feed) { sfx_pcm_feed_state_t *fs; ACQUIRE_LOCK(); if (!self->feeds) { @@ -203,8 +200,7 @@ mix_subscribe(sfx_pcm_mixer_t *self, sfx_pcm_feed_t *feed) { } -static void -_mix_unsubscribe(sfx_pcm_mixer_t *self, sfx_pcm_feed_t *feed) { +static void _mix_unsubscribe(sfx_pcm_mixer_t *self, sfx_pcm_feed_t *feed) { int i; #ifdef DEBUG sciprintf("[soft-mixer] Unsubscribing %s-%x\n", feed->debug_name, feed->debug_nr); @@ -248,8 +244,7 @@ _mix_unsubscribe(sfx_pcm_mixer_t *self, sfx_pcm_feed_t *feed) { BREAKPOINT(); } -static void -mix_exit(sfx_pcm_mixer_t *self) { +static void mix_exit(sfx_pcm_mixer_t *self) { ACQUIRE_LOCK(); while (self->feeds_nr) _mix_unsubscribe(self, self->feeds[0].feed); @@ -280,8 +275,7 @@ mix_exit(sfx_pcm_mixer_t *self) { else if (v > 32766) \ v = 32767 -static inline void -mix_compute_output(sfx_pcm_mixer_t *self, int outplen) { +static inline void mix_compute_output(sfx_pcm_mixer_t *self, int outplen) { int frame_i; sfx_pcm_config_t conf = self->dev->conf; int use_16 = conf.format & SFX_PCM_FORMAT_16; @@ -375,8 +369,7 @@ mix_compute_output(sfx_pcm_mixer_t *self, int outplen) { } } -static inline void -mix_swap_buffers(sfx_pcm_mixer_t *self) { /* Swap buffers */ +static inline void mix_swap_buffers(sfx_pcm_mixer_t *self) { /* Swap buffers */ byte *tmp = P->outbuf; P->outbuf = P->writebuf; P->writebuf = tmp; @@ -388,8 +381,7 @@ mix_swap_buffers(sfx_pcm_mixer_t *self) { /* Swap buffers */ * ((long) self->dev->conf.rate)) \ / (1000000L >> 7) -static inline int -mix_compute_buf_len(sfx_pcm_mixer_t *self, int *skip_frames) +static inline int mix_compute_buf_len(sfx_pcm_mixer_t *self, int *skip_frames) /* Computes the number of frames we ought to write. It tries to minimise the number, ** in order to reduce latency. */ /* It sets 'skip_frames' to the number of frames to assume lost by latency, effectively @@ -543,12 +535,10 @@ mix_compute_buf_len(sfx_pcm_mixer_t *self, int *skip_frames) static volatile int xx_offset; static volatile int xx_size; -static void -mix_compute_input_linear(sfx_pcm_mixer_t *self, int add_result, - int len, sfx_timestamp_t *ts, sfx_timestamp_t base_ts) +static void mix_compute_input_linear(sfx_pcm_mixer_t *self, int add_result, + int len, sfx_timestamp_t *ts, sfx_timestamp_t base_ts) { /* if add_result is non-zero, P->outbuf should be added to rather than overwritten. */ /* base_ts is the timestamp for the first frame */ -{ sfx_pcm_feed_state_t *fs = self->feeds + add_result; sfx_pcm_feed_t *f = fs->feed; sfx_pcm_config_t conf = f->conf; @@ -811,8 +801,7 @@ mix_compute_input_linear(sfx_pcm_mixer_t *self, int add_result, } } -static int -mix_process_linear(sfx_pcm_mixer_t *self) { +static int mix_process_linear(sfx_pcm_mixer_t *self) { ACQUIRE_LOCK(); { int src_i; /* source feed index counter */ @@ -939,15 +928,13 @@ mix_process_linear(sfx_pcm_mixer_t *self) { return SFX_OK; } -static void -mix_pause(sfx_pcm_mixer_t *self) { +static void mix_pause(sfx_pcm_mixer_t *self) { ACQUIRE_LOCK(); P->paused = 1; RELEASE_LOCK(); } -static void -mix_resume(sfx_pcm_mixer_t *self) { +static void mix_resume(sfx_pcm_mixer_t *self) { ACQUIRE_LOCK(); P->paused = 0; RELEASE_LOCK(); diff --git a/engines/sci/sfx/player/players.cpp b/engines/sci/sfx/player/players.cpp index b92ce930b1..32623d0fc7 100644 --- a/engines/sci/sfx/player/players.cpp +++ b/engines/sci/sfx/player/players.cpp @@ -36,8 +36,7 @@ sfx_player_t *sfx_players[] = { NULL }; -sfx_player_t * -sfx_find_player(char *name) { +sfx_player_t *sfx_find_player(char *name) { if (!name) { /* Implement platform policy here */ diff --git a/engines/sci/sfx/player/polled.cpp b/engines/sci/sfx/player/polled.cpp index 5856351bc8..7690f686db 100644 --- a/engines/sci/sfx/player/polled.cpp +++ b/engines/sci/sfx/player/polled.cpp @@ -45,8 +45,7 @@ static int new_song = 0; #define TIME_INC 60 static int time_counter = 0; -static void -pp_tell_synth(int buf_nr, byte *buf) { +static void pp_tell_synth(int buf_nr, byte *buf) { seq->handle_command(seq, buf[0], buf_nr - 1, buf + 1); } @@ -54,8 +53,7 @@ pp_tell_synth(int buf_nr, byte *buf) { /*----------------------*/ /* Mixer implementation */ /*----------------------*/ -int -ppf_poll(sfx_pcm_feed_t *self, byte *dest, int size) { +int ppf_poll(sfx_pcm_feed_t *self, byte *dest, int size) { int written = 0; byte buf[4]; int buf_nr; @@ -115,13 +113,11 @@ ppf_poll(sfx_pcm_feed_t *self, byte *dest, int size) { return size; /* Apparently, we wrote all that was requested */ } -void -ppf_destroy(sfx_pcm_feed_t *self) { +void ppf_destroy(sfx_pcm_feed_t *self) { /* no-op */ } -int -ppf_get_timestamp(sfx_pcm_feed_t *self, sfx_timestamp_t *timestamp) { +int ppf_get_timestamp(sfx_pcm_feed_t *self, sfx_timestamp_t *timestamp) { if (!new_song) return PCM_FEED_IDLE; @@ -133,8 +129,8 @@ ppf_get_timestamp(sfx_pcm_feed_t *self, sfx_timestamp_t *timestamp) { } extern sfx_player_t sfx_player_polled; -static -sfx_pcm_feed_t pcmfeed = { + +static sfx_pcm_feed_t pcmfeed = { ppf_poll, ppf_destroy, ppf_get_timestamp, @@ -154,18 +150,15 @@ sfx_pcm_feed_t pcmfeed = { /* API implementation */ /*--------------------*/ -static void -pp_timer_callback(void) { +static void pp_timer_callback(void) { /* Hey, we're polled anyway ;-) */ } -static int -pp_set_option(char *name, char *value) { +static int pp_set_option(char *name, char *value) { return SFX_ERROR; } -static int -pp_init(ResourceManager *resmgr, int expected_latency) { +static int pp_init(ResourceManager *resmgr, int expected_latency) { resource_t *res = NULL, *res2 = NULL; if (!mixer) @@ -209,8 +202,7 @@ pp_init(ResourceManager *resmgr, int expected_latency) { return SFX_OK; } -static int -pp_add_iterator(song_iterator_t *it, GTimeVal start_time) { +static int pp_add_iterator(song_iterator_t *it, GTimeVal start_time) { song_iterator_t *old = play_it; SIMSG_SEND(it, SIMSG_SET_PLAYMASK(seq->playmask)); @@ -237,14 +229,12 @@ pp_add_iterator(song_iterator_t *it, GTimeVal start_time) { return SFX_OK; } -static int -pp_fade_out(void) { +static int pp_fade_out(void) { warning(__FILE__": Attempt to fade out- not implemented yet"); return SFX_ERROR; } -static int -pp_stop(void) { +static int pp_stop(void) { song_iterator_t *it = play_it; play_it = NULL; @@ -257,8 +247,7 @@ pp_stop(void) { return SFX_OK; } -static int -pp_send_iterator_message(song_iterator_message_t msg) { +static int pp_send_iterator_message(song_iterator_message_t msg) { if (!play_it) return SFX_ERROR; @@ -266,16 +255,14 @@ pp_send_iterator_message(song_iterator_message_t msg) { return SFX_OK; } -static int -pp_pause(void) { +static int pp_pause(void) { play_paused = 1; seq->set_volume(seq, 0); return SFX_OK; } -static int -pp_resume(void) { +static int pp_resume(void) { if (!play_it) { play_paused = 0; return SFX_OK; /* Nothing to resume */ @@ -291,8 +278,7 @@ pp_resume(void) { return SFX_OK; } -static int -pp_exit(void) { +static int pp_exit(void) { seq->exit(seq); songit_free(play_it); play_it = NULL; diff --git a/engines/sci/sfx/seq/sequencers.cpp b/engines/sci/sfx/seq/sequencers.cpp index 561f4c4cf7..ce73beab0f 100644 --- a/engines/sci/sfx/seq/sequencers.cpp +++ b/engines/sci/sfx/seq/sequencers.cpp @@ -33,8 +33,7 @@ sfx_sequencer_t *sfx_sequencers[] = { }; -sfx_sequencer_t * -sfx_find_sequencer(char *name) { +sfx_sequencer_t *sfx_find_sequencer(char *name) { if (!name) { /* Implement default policy for your platform (if any) here, or in a function ** called from here (if it's non-trivial). Try to use midi_devices[0], if diff --git a/engines/sci/sfx/softseq/SN76496.cpp b/engines/sci/sfx/softseq/SN76496.cpp index f128be2d00..3f9c076a43 100644 --- a/engines/sci/sfx/softseq/SN76496.cpp +++ b/engines/sci/sfx/softseq/SN76496.cpp @@ -46,23 +46,19 @@ extern sfx_softseq_t sfx_softseq_pcspeaker; /* Forward-declare the sequencer we are defining here */ -static int -SN76496_set_option(sfx_softseq_t *self, const char *name, const char *value) { +static int SN76496_set_option(sfx_softseq_t *self, const char *name, const char *value) { return SFX_ERROR; } -static int -SN76496_init(sfx_softseq_t *self, byte *patch, int patch_len, byte *patch2, +static int SN76496_init(sfx_softseq_t *self, byte *patch, int patch_len, byte *patch2, int patch2_len) { return SFX_OK; } -static void -SN76496_exit(sfx_softseq_t *self) { +static void SN76496_exit(sfx_softseq_t *self) { } -static void -SN76496_event(sfx_softseq_t *self, byte command, int argc, byte *argv) { +static void SN76496_event(sfx_softseq_t *self, byte command, int argc, byte *argv) { int i; int chan = -1; #if 0 @@ -136,8 +132,7 @@ SN76496_event(sfx_softseq_t *self, byte command, int argc, byte *argv) { #define BASE_NOTE 129 /* A10 */ #define BASE_OCTAVE 10 /* A10, as I said */ -static int -freq_table[12] = { /* A4 is 440Hz, halftone map is x |-> ** 2^(x/12) */ +static int freq_table[12] = { /* A4 is 440Hz, halftone map is x |-> ** 2^(x/12) */ 28160, /* A10 */ 29834, 31608, @@ -152,8 +147,7 @@ freq_table[12] = { /* A4 is 440Hz, halftone map is x |-> ** 2^(x/12) */ 53159 }; -static inline int -get_freq(int note) { +static inline int get_freq(int note) { int halftone_delta = note - BASE_NOTE; int oct_diff = ((halftone_delta + BASE_OCTAVE * 12) / 12) - BASE_OCTAVE; int halftone_index = (halftone_delta + (12 * 100)) % 12 ; @@ -163,8 +157,7 @@ get_freq(int note) { } -void -SN76496_poll(sfx_softseq_t *self, byte *dest, int len) { +void SN76496_poll(sfx_softseq_t *self, byte *dest, int len) { gint16 *buf = (gint16 *) dest; int i; int chan; @@ -206,15 +199,13 @@ SN76496_poll(sfx_softseq_t *self, byte *dest, int len) { } -void -SN76496_allstop(sfx_softseq_t *self) { +void SN76496_allstop(sfx_softseq_t *self) { int i; for (i = 0; i < CHANNELS_NR; i++) notes[i] = 0; } -void -SN76496_volume(sfx_softseq_t *self, int new_volume) { +void SN76496_volume(sfx_softseq_t *self, int new_volume) { global_volume = new_volume; } diff --git a/engines/sci/sfx/softseq/amiga.cpp b/engines/sci/sfx/softseq/amiga.cpp index 815d84f17f..4ceb0d311e 100644 --- a/engines/sci/sfx/softseq/amiga.cpp +++ b/engines/sci/sfx/softseq/amiga.cpp @@ -131,8 +131,7 @@ static int freq_table[] = { 59932, 63496, 67271, 71271, 75509, 80000, 84757, 89796 }; -static void -set_envelope(channel_t *channel, envelope_t *envelope, int phase) { +static void set_envelope(channel_t *channel, envelope_t *envelope, int phase) { channel->envelope = phase; channel->envelope_samples = envelope[phase].length; @@ -142,16 +141,14 @@ set_envelope(channel_t *channel, envelope_t *envelope, int phase) { channel->velocity = envelope[phase - 1].target; } -static inline int -interpolate(sbyte *samples, frac_t offset) { +static inline int interpolate(sbyte *samples, frac_t offset) { int x = fracToInt(offset); int diff = (samples[x + 1] - samples[x]) << 8; return (samples[x] << 8) + fracToInt(diff * (offset & FRAC_LO_MASK)); } -static void -play_instrument(gint16 *dest, channel_t *channel, int count) { +static void play_instrument(gint16 *dest, channel_t *channel, int count) { int index = 0; int vol = hw_channels[channel->hw_channel].volume; instrument_t *instrument = bank.instruments[channel->instrument]; @@ -253,8 +250,7 @@ play_instrument(gint16 *dest, channel_t *channel, int count) { } } -static void -change_instrument(int channel, int instrument) { +static void change_instrument(int channel, int instrument) { #ifdef DEBUG if (bank.instruments[instrument]) sciprintf("[sfx:seq:amiga] Setting channel %i to \"%s\" (%i)\n", channel, bank.instruments[instrument]->name, instrument); @@ -264,8 +260,7 @@ change_instrument(int channel, int instrument) { hw_channels[channel].instrument = instrument; } -static void -stop_channel(int ch) { +static void stop_channel(int ch) { int i; /* Start decay phase for note on this hw channel, if any */ @@ -278,8 +273,7 @@ stop_channel(int ch) { } } -static void -stop_note(int ch, int note) { +static void stop_note(int ch, int note) { int channel; instrument_t *instrument; @@ -301,8 +295,7 @@ stop_note(int ch, int note) { set_envelope(&channels[channel], instrument->envelope, 2); } -static void -start_note(int ch, int note, int velocity) { +static void start_note(int ch, int note, int velocity) { instrument_t *instrument; int channel; @@ -453,13 +446,11 @@ static instrument_t *read_instrument(FILE *file, int *id) { return instrument; } -static int -ami_set_option(sfx_softseq_t *self, const char *name, const char *value) { +static int ami_set_option(sfx_softseq_t *self, const char *name, const char *value) { return SFX_ERROR; } -static int -ami_init(sfx_softseq_t *self, byte *patch, int patch_len, byte *patch2, int patch2_len) { +static int ami_init(sfx_softseq_t *self, byte *patch, int patch_len, byte *patch2, int patch2_len) { FILE *file; byte header[40]; int i; @@ -520,8 +511,7 @@ ami_init(sfx_softseq_t *self, byte *patch, int patch_len, byte *patch2, int patc return SFX_OK; } -static void -ami_exit(sfx_softseq_t *self) { +static void ami_exit(sfx_softseq_t *self) { int i; for (i = 0; i < bank.size; i++) { @@ -532,8 +522,7 @@ ami_exit(sfx_softseq_t *self) { } } -static void -ami_event(sfx_softseq_t *self, byte command, int argc, byte *argv) { +static void ami_event(sfx_softseq_t *self, byte command, int argc, byte *argv) { int channel, oper; channel = command & 0x0f; @@ -578,8 +567,7 @@ ami_event(sfx_softseq_t *self, byte command, int argc, byte *argv) { } } -void -ami_poll(sfx_softseq_t *self, byte *dest, int len) { +void ami_poll(sfx_softseq_t *self, byte *dest, int len) { int i, j; gint16 *buf = (gint16 *) dest; gint16 *buffers = (gint16*)malloc(len * 2 * CHANNELS_NR); @@ -607,13 +595,11 @@ ami_poll(sfx_softseq_t *self, byte *dest, int len) { } } -void -ami_volume(sfx_softseq_t *self, int new_volume) { +void ami_volume(sfx_softseq_t *self, int new_volume) { volume = new_volume; } -void -ami_allstop(sfx_softseq_t *self) { +void ami_allstop(sfx_softseq_t *self) { int i; for (i = 0; i < HW_CHANNELS_NR; i++) stop_channel(i); diff --git a/engines/sci/sfx/softseq/opl2.cpp b/engines/sci/sfx/softseq/opl2.cpp index 4ca05412d7..3a607a3188 100644 --- a/engines/sci/sfx/softseq/opl2.cpp +++ b/engines/sci/sfx/softseq/opl2.cpp @@ -403,8 +403,7 @@ int adlibemu_start_note(int chn, int note, int velocity) { return 0; } -static -void adlibemu_update_pitch(int chn, int note, int newpitch) { +static void adlibemu_update_pitch(int chn, int note, int newpitch) { int i; int matched = 0; @@ -469,8 +468,7 @@ void test_adlib(void) { /* count is # of FRAMES, not bytes. We assume 16-bit stereo frames (ie 4 bytes) */ -static void -opl2_poll(sfx_softseq_t *self, byte *dest, int count) { +static void opl2_poll(sfx_softseq_t *self, byte *dest, int count) { gint16 *buffer = (gint16 *) dest; gint16 *ptr = buffer; @@ -517,8 +515,7 @@ 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, +static int opl2_init(sfx_softseq_t *self, byte *data_ptr, int data_length, byte *data2_ptr, int data2_length) { int i; @@ -550,8 +547,7 @@ opl2_init(sfx_softseq_t *self, byte *data_ptr, int data_length, byte *data2_ptr, } -static void -opl2_exit(sfx_softseq_t *self) { +static void opl2_exit(sfx_softseq_t *self) { FM_OPL *opl = ym3812_L; ym3812_L = NULL; OPLDestroy(opl); @@ -562,8 +558,7 @@ opl2_exit(sfx_softseq_t *self) { // XXX deregister with pcm layer. } -static void -opl2_allstop(sfx_softseq_t *self) { +static void opl2_allstop(sfx_softseq_t *self) { // printf("AdlibEmu: Reset\n"); if (! ready) return; @@ -655,8 +650,7 @@ int midi_adlibemu_event2(guint8 command, guint8 param, guint32 delta) { return 0; } -static void -opl2_volume(sfx_softseq_t *self, int volume) { +static void opl2_volume(sfx_softseq_t *self, int volume) { guint8 i; i = (guint8)volume * 15 / 100; @@ -668,13 +662,11 @@ opl2_volume(sfx_softseq_t *self, int volume) { #endif } -int -opl2_set_option(sfx_softseq_t *self, const char *name, const char *value) { +int opl2_set_option(sfx_softseq_t *self, const char *name, const char *value) { return SFX_ERROR; } -void -opl2_event(sfx_softseq_t *self, byte cmd, int argc, byte *argv) { +void opl2_event(sfx_softseq_t *self, byte cmd, int argc, byte *argv) { if (argc == 1) midi_adlibemu_event2(cmd, argv[0], 0); else if (argc == 2) diff --git a/engines/sci/sfx/softseq/pcspeaker.cpp b/engines/sci/sfx/softseq/pcspeaker.cpp index 3f4bb0f332..2b5bea3fbe 100644 --- a/engines/sci/sfx/softseq/pcspeaker.cpp +++ b/engines/sci/sfx/softseq/pcspeaker.cpp @@ -40,23 +40,19 @@ extern sfx_softseq_t sfx_softseq_pcspeaker; /* Forward-declare the sequencer we are defining here */ -static int -sps_set_option(sfx_softseq_t *self, const char *name, const char *value) { +static int sps_set_option(sfx_softseq_t *self, const char *name, const char *value) { return SFX_ERROR; } -static int -sps_init(sfx_softseq_t *self, byte *patch, int patch_len, byte *patch2, +static int sps_init(sfx_softseq_t *self, byte *patch, int patch_len, byte *patch2, int patch2_len) { return SFX_OK; } -static void -sps_exit(sfx_softseq_t *self) { +static void sps_exit(sfx_softseq_t *self) { } -static void -sps_event(sfx_softseq_t *self, byte command, int argc, byte *argv) { +static void sps_event(sfx_softseq_t *self, byte command, int argc, byte *argv) { #if 0 fprintf(stderr, "Note [%02x : %02x %02x]\n", command, argc ? argv[0] : 0, (argc > 1) ? argv[1] : 0); #endif @@ -93,8 +89,7 @@ sps_event(sfx_softseq_t *self, byte command, int argc, byte *argv) { #define BASE_NOTE 129 /* A10 */ #define BASE_OCTAVE 10 /* A10, as I said */ -static int -freq_table[12] = { /* A4 is 440Hz, halftone map is x |-> ** 2^(x/12) */ +static int freq_table[12] = { /* A4 is 440Hz, halftone map is x |-> ** 2^(x/12) */ 28160, /* A10 */ 29834, 31608, @@ -110,8 +105,7 @@ freq_table[12] = { /* A4 is 440Hz, halftone map is x |-> ** 2^(x/12) */ }; -void -sps_poll(sfx_softseq_t *self, byte *dest, int len) { +void sps_poll(sfx_softseq_t *self, byte *dest, int len) { int halftone_delta = note - BASE_NOTE; int oct_diff = ((halftone_delta + BASE_OCTAVE * 12) / 12) - BASE_OCTAVE; int halftone_index = (halftone_delta + (12 * 100)) % 12 ; @@ -146,13 +140,11 @@ sps_poll(sfx_softseq_t *self, byte *dest, int len) { } -void -sps_volume(sfx_softseq_t *self, int new_volume) { +void sps_volume(sfx_softseq_t *self, int new_volume) { volume = new_volume << 4; } -void -sps_allstop(sfx_softseq_t *self) { +void sps_allstop(sfx_softseq_t *self) { note = 0; } diff --git a/engines/sci/sfx/softseq/softsequencers.cpp b/engines/sci/sfx/softseq/softsequencers.cpp index e43e9b8cda..8ab3aa61ab 100644 --- a/engines/sci/sfx/softseq/softsequencers.cpp +++ b/engines/sci/sfx/softseq/softsequencers.cpp @@ -51,8 +51,7 @@ static sfx_softseq_t *sw_sequencers[] = { }; -sfx_softseq_t * -sfx_find_softseq(const char *name) { +sfx_softseq_t *sfx_find_softseq(const char *name) { if (!name) return sw_sequencers[0]; else { |