aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJonathan Neuschäfer <j.neuschaefer@gmx.net>2011-07-25 21:55:43 +0200
committerMax Kellermann <max@duempel.org>2011-08-27 11:30:34 +0200
commit310895f0606ebe1f88e20755f221c51cc66a63df (patch)
tree1e3c4727d39cc9dc889780511b7d7d365038ea63 /src
parent4428894abaa4d40c443cabbf6c1eb467d6f55791 (diff)
downloadmpd-310895f0606ebe1f88e20755f221c51cc66a63df.tar.gz
mpd-310895f0606ebe1f88e20755f221c51cc66a63df.tar.xz
mpd-310895f0606ebe1f88e20755f221c51cc66a63df.zip
rename 'Timer' to 'struct timer'
Diffstat (limited to '')
-rw-r--r--src/decoder/fluidsynth_decoder_plugin.c2
-rw-r--r--src/output/fifo_output_plugin.c2
-rw-r--r--src/output/httpd_internal.h4
-rw-r--r--src/output/null_plugin.c4
-rw-r--r--src/output/openal_plugin.c2
-rw-r--r--src/timer.c16
-rw-r--r--src/timer.h18
7 files changed, 24 insertions, 24 deletions
diff --git a/src/decoder/fluidsynth_decoder_plugin.c b/src/decoder/fluidsynth_decoder_plugin.c
index 87ff091a7..814a7b554 100644
--- a/src/decoder/fluidsynth_decoder_plugin.c
+++ b/src/decoder/fluidsynth_decoder_plugin.c
@@ -102,7 +102,7 @@ fluidsynth_file_decode(struct decoder *decoder, const char *path_fs)
fluid_player_t *player;
char *path_dup;
int ret;
- Timer *timer;
+ struct timer *timer;
enum decoder_command cmd;
soundfont_path =
diff --git a/src/output/fifo_output_plugin.c b/src/output/fifo_output_plugin.c
index 3ecc16e3e..8f2234dd7 100644
--- a/src/output/fifo_output_plugin.c
+++ b/src/output/fifo_output_plugin.c
@@ -42,7 +42,7 @@ struct fifo_data {
int input;
int output;
bool created;
- Timer *timer;
+ struct timer *timer;
};
/**
diff --git a/src/output/httpd_internal.h b/src/output/httpd_internal.h
index 67396b667..3e6e9768d 100644
--- a/src/output/httpd_internal.h
+++ b/src/output/httpd_internal.h
@@ -65,10 +65,10 @@ struct httpd_output {
GMutex *mutex;
/**
- * A #Timer object to synchronize this output with the
+ * A #timer object to synchronize this output with the
* wallclock.
*/
- Timer *timer;
+ struct timer *timer;
/**
* The listener socket.
diff --git a/src/output/null_plugin.c b/src/output/null_plugin.c
index 5ccb1c00d..f572959a0 100644
--- a/src/output/null_plugin.c
+++ b/src/output/null_plugin.c
@@ -28,7 +28,7 @@
struct null_data {
bool sync;
- Timer *timer;
+ struct timer *timer;
};
static void *
@@ -82,7 +82,7 @@ null_play(void *data, G_GNUC_UNUSED const void *chunk, size_t size,
G_GNUC_UNUSED GError **error)
{
struct null_data *nd = data;
- Timer *timer = nd->timer;
+ struct timer *timer = nd->timer;
if (!nd->sync)
return size;
diff --git a/src/output/openal_plugin.c b/src/output/openal_plugin.c
index 45a9a30ad..23641c6c5 100644
--- a/src/output/openal_plugin.c
+++ b/src/output/openal_plugin.c
@@ -41,7 +41,7 @@ struct openal_data {
const char *device_name;
ALCdevice *device;
ALCcontext *context;
- Timer *timer;
+ struct timer *timer;
ALuint buffers[NUM_BUFFERS];
int filled;
ALuint source;
diff --git a/src/timer.c b/src/timer.c
index cc2e2c178..bbc7a4ab9 100644
--- a/src/timer.c
+++ b/src/timer.c
@@ -37,9 +37,9 @@ static uint64_t now(void)
return ((uint64_t)tv.tv_sec * 1000000) + tv.tv_usec;
}
-Timer *timer_new(const struct audio_format *af)
+struct timer *timer_new(const struct audio_format *af)
{
- Timer *timer = g_new(Timer, 1);
+ struct timer *timer = g_new(struct timer, 1);
timer->time = 0;
timer->started = 0;
timer->rate = af->sample_rate * audio_format_frame_size(af);
@@ -47,24 +47,24 @@ Timer *timer_new(const struct audio_format *af)
return timer;
}
-void timer_free(Timer *timer)
+void timer_free(struct timer *timer)
{
g_free(timer);
}
-void timer_start(Timer *timer)
+void timer_start(struct timer *timer)
{
timer->time = now();
timer->started = 1;
}
-void timer_reset(Timer *timer)
+void timer_reset(struct timer *timer)
{
timer->time = 0;
timer->started = 0;
}
-void timer_add(Timer *timer, int size)
+void timer_add(struct timer *timer, int size)
{
assert(timer->started);
@@ -72,7 +72,7 @@ void timer_add(Timer *timer, int size)
}
unsigned
-timer_delay(const Timer *timer)
+timer_delay(const struct timer *timer)
{
int64_t delay = (int64_t)(timer->time - now()) / 1000;
if (delay < 0)
@@ -84,7 +84,7 @@ timer_delay(const Timer *timer)
return delay / 1000;
}
-void timer_sync(Timer *timer)
+void timer_sync(struct timer *timer)
{
int64_t sleep_duration;
diff --git a/src/timer.h b/src/timer.h
index 5ecfa0b8b..184881249 100644
--- a/src/timer.h
+++ b/src/timer.h
@@ -24,28 +24,28 @@
struct audio_format;
-typedef struct _Timer {
+struct timer {
uint64_t time;
int started;
int rate;
-} Timer;
+};
-Timer *timer_new(const struct audio_format *af);
+struct timer *timer_new(const struct audio_format *af);
-void timer_free(Timer *timer);
+void timer_free(struct timer *timer);
-void timer_start(Timer *timer);
+void timer_start(struct timer *timer);
-void timer_reset(Timer *timer);
+void timer_reset(struct timer *timer);
-void timer_add(Timer *timer, int size);
+void timer_add(struct timer *timer, int size);
/**
* Returns the number of milliseconds to sleep to get back to sync.
*/
unsigned
-timer_delay(const Timer *timer);
+timer_delay(const struct timer *timer);
-void timer_sync(Timer *timer);
+void timer_sync(struct timer *timer);
#endif