Commit 182746b9 authored by Max Kellermann's avatar Max Kellermann

timer: constant pointers

The audio_format argument to timer_new() should be constant, because it is not modified. The same is true for ShoutData.audioFormat.
parent 35494158
...@@ -65,7 +65,7 @@ typedef struct _ShoutData { ...@@ -65,7 +65,7 @@ typedef struct _ShoutData {
Timer *timer; Timer *timer;
/* just a pointer to audioOutput->outAudioFormat */ /* just a pointer to audioOutput->outAudioFormat */
struct audio_format *audioFormat; const struct audio_format *audioFormat;
} ShoutData; } ShoutData;
static ShoutData *newShoutData(void) static ShoutData *newShoutData(void)
......
...@@ -30,7 +30,7 @@ static uint64_t now(void) ...@@ -30,7 +30,7 @@ static uint64_t now(void)
return ((uint64_t)tv.tv_sec * 1000000) + tv.tv_usec; return ((uint64_t)tv.tv_sec * 1000000) + tv.tv_usec;
} }
Timer *timer_new(struct audio_format *af) Timer *timer_new(const struct audio_format *af)
{ {
Timer *timer; Timer *timer;
......
...@@ -29,7 +29,7 @@ typedef struct _Timer { ...@@ -29,7 +29,7 @@ typedef struct _Timer {
int rate; int rate;
} Timer; } Timer;
Timer *timer_new(struct audio_format *af); Timer *timer_new(const struct audio_format *af);
void timer_free(Timer *timer); void timer_free(Timer *timer);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment