aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/sfx/player
diff options
context:
space:
mode:
authorPaweł Kołodziejski2009-02-21 17:23:28 +0000
committerPaweł Kołodziejski2009-02-21 17:23:28 +0000
commitf18d5500b1a3fc78c3190c8c2dbce8c6abf5095c (patch)
treef587a8190988b05a93df7464af5b19c676ebf7d1 /engines/sci/sfx/player
parenta0cc744aab81339653ad0b185cfb90bb90cf4410 (diff)
downloadscummvm-rg350-f18d5500b1a3fc78c3190c8c2dbce8c6abf5095c.tar.gz
scummvm-rg350-f18d5500b1a3fc78c3190c8c2dbce8c6abf5095c.tar.bz2
scummvm-rg350-f18d5500b1a3fc78c3190c8c2dbce8c6abf5095c.zip
formating
svn-id: r38709
Diffstat (limited to 'engines/sci/sfx/player')
-rw-r--r--engines/sci/sfx/player/players.cpp3
-rw-r--r--engines/sci/sfx/player/polled.cpp46
2 files changed, 17 insertions, 32 deletions
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;