aboutsummaryrefslogtreecommitdiffstats
path: root/src/output/HttpdOutputPlugin.cxx
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2013-06-24 16:17:46 +0200
committerMax Kellermann <max@duempel.org>2013-06-24 16:17:46 +0200
commitef48eca9cac875f65622daf500bd702e20d666f3 (patch)
tree52fe455c347fd0f0ab14b471e2482c17c8aed5e6 /src/output/HttpdOutputPlugin.cxx
parent906d2fbadf075b7d8e3a5be7134a9bebb09b7285 (diff)
parente9e55b08127dc45b4c6045e1f42e34115086a521 (diff)
downloadmpd-ef48eca9cac875f65622daf500bd702e20d666f3.tar.gz
mpd-ef48eca9cac875f65622daf500bd702e20d666f3.tar.xz
mpd-ef48eca9cac875f65622daf500bd702e20d666f3.zip
Merge branch 'master' of git://git.musicpd.org/dk/mpd
Diffstat (limited to '')
-rw-r--r--src/output/HttpdOutputPlugin.cxx16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/output/HttpdOutputPlugin.cxx b/src/output/HttpdOutputPlugin.cxx
index bb644c318..2c4884827 100644
--- a/src/output/HttpdOutputPlugin.cxx
+++ b/src/output/HttpdOutputPlugin.cxx
@@ -320,7 +320,7 @@ HttpdOutput::Open(struct audio_format *audio_format, GError **error_r)
/* initialize other attributes */
clients_cnt = 0;
- timer = timer_new(audio_format);
+ timer = new Timer(*audio_format);
open = true;
@@ -346,7 +346,7 @@ HttpdOutput::Close()
open = false;
- timer_free(timer);
+ delete timer;
clients.clear();
@@ -398,7 +398,7 @@ httpd_output_delay(struct audio_output *ao)
then httpd_output_pause() will not do anything, it
will not fill the buffer and it will not update the
timer; therefore, we reset the timer here */
- timer_reset(httpd->timer);
+ httpd->timer->Reset();
/* some arbitrary delay that is long enough to avoid
consuming too much CPU, and short enough to notice
@@ -406,8 +406,8 @@ httpd_output_delay(struct audio_output *ao)
return 1000;
}
- return httpd->timer->started
- ? timer_delay(httpd->timer)
+ return httpd->timer->IsStarted()
+ ? httpd->timer->GetDelay()
: 0;
}
@@ -463,9 +463,9 @@ httpd_output_play(struct audio_output *ao, const void *chunk, size_t size,
return 0;
}
- if (!httpd->timer->started)
- timer_start(httpd->timer);
- timer_add(httpd->timer, size);
+ if (!httpd->timer->IsStarted())
+ httpd->timer->Start();
+ httpd->timer->Add(size);
return size;
}