From 28a60db5aa4c368e221595444b76c66ba1fe6960 Mon Sep 17 00:00:00 2001 From: Hagen Fritsch Date: Wed, 27 Feb 2013 19:42:32 +0100 Subject: clock: add missing include --- NEWS | 1 + src/clock.c | 3 +++ 2 files changed, 4 insertions(+) diff --git a/NEWS b/NEWS index 8617ffb08..7fa7dc035 100644 --- a/NEWS +++ b/NEWS @@ -5,6 +5,7 @@ ver 0.17.4 (2013/??/??) - ffmpeg: support float planar audio (ffmpeg 1.1) * player: - implement missing "idle" events on output errors +* clock: fix build failure ver 0.17.3 (2013/01/06) diff --git a/src/clock.c b/src/clock.c index 4100fa2d8..dcdf685ab 100644 --- a/src/clock.c +++ b/src/clock.c @@ -25,6 +25,9 @@ #include #else #include +#ifndef CLOCK_MONOTONIC +#include +#endif #endif unsigned -- cgit v1.2.3 From 2cf31e905b445fe4dbcea5fc194b69dcb46c3210 Mon Sep 17 00:00:00 2001 From: Hagen Fritsch Date: Wed, 27 Feb 2013 19:41:30 +0100 Subject: clock: fix usec-to-usec factor --- src/clock.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/clock.c b/src/clock.c index dcdf685ab..d987aed48 100644 --- a/src/clock.c +++ b/src/clock.c @@ -92,7 +92,7 @@ monotonic_clock_us(void) /* we have no monotonic clock, fall back to gettimeofday() */ struct timeval tv; gettimeofday(&tv, 0); - return (uint64_t)tv.tv_sec * 1000 + (uint64_t)(tv.tv_usec) / 1000(; + return (uint64_t)tv.tv_sec * 1000 + (uint64_t)tv.tv_usec; #endif } -- cgit v1.2.3 From 6f4bb6cd2c43b1be330d24867158e4334f69ab3f Mon Sep 17 00:00:00 2001 From: Hagen Fritsch Date: Sun, 24 Feb 2013 18:19:55 +0100 Subject: Add some comments to keep track of timer units. --- src/timer.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/timer.c b/src/timer.c index 2d9550706..9a3228465 100644 --- a/src/timer.c +++ b/src/timer.c @@ -31,9 +31,9 @@ struct timer *timer_new(const struct audio_format *af) { struct timer *timer = g_new(struct timer, 1); - timer->time = 0; - timer->started = 0; - timer->rate = af->sample_rate * audio_format_frame_size(af); + timer->time = 0; // us + timer->started = 0; // false + timer->rate = af->sample_rate * audio_format_frame_size(af); // samples per second return timer; } @@ -59,6 +59,8 @@ void timer_add(struct timer *timer, int size) { assert(timer->started); + // (size samples) / (rate samples per second) = duration seconds + // duration seconds * 1000000 = duration us timer->time += ((uint64_t)size * 1000000) / timer->rate; } -- cgit v1.2.3 From 46528783ef07d1180d7059f3916d277a2f9a0c31 Mon Sep 17 00:00:00 2001 From: Florian Schlichting Date: Wed, 27 Feb 2013 19:50:05 +0100 Subject: fix typos in upstream's mpd.conf.5 --- doc/mpd.1 | 12 ++++++------ doc/mpd.conf.5 | 12 ++++++------ 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/doc/mpd.1 b/doc/mpd.1 index b70843673..49a3e1beb 100644 --- a/doc/mpd.1 +++ b/doc/mpd.1 @@ -18,23 +18,23 @@ uses CONF_FILE. Read more about MPD at <\fBhttp://www.musicpd.org/\fP>. .SH OPTIONS .TP -.BI --help +.BI \-\-help Output a brief help message. .TP -.BI --kill +.BI \-\-kill Kill the currently running mpd session. The pid_file parameter must be specified in the config file for this to work. .TP -.BI --no-daemon +.BI \-\-no\-daemon Don't detach from console. .TP -.BI --stderr +.BI \-\-stderr Print messages stderr. .TP -.BI --verbose +.BI \-\-verbose Verbose logging. .TP -.BI --version +.BI \-\-version Print version information. .SH FILES .TP diff --git a/doc/mpd.conf.5 b/doc/mpd.conf.5 index 33049bf3c..59d5e623a 100644 --- a/doc/mpd.conf.5 +++ b/doc/mpd.conf.5 @@ -175,7 +175,7 @@ only choice) if MPD was compiled without libsamplerate. .RE .IP For an up-to-date list of available converters, please see the libsamplerate -documentation (available online at <\fBhttp://www.mega-nerd.com/SRC/\fP>). +documentation (available online at <\fBhttp://www.mega\-nerd.com/SRC/\fP>). .TP .B replaygain If specified, mpd will adjust the volume of songs played using ReplayGain tags @@ -186,7 +186,7 @@ tags if random play is activated otherwise the album ReplayGain tags. Currently only FLAC, Ogg Vorbis, Musepack, and MP3 (through ID3v2 ReplayGain tags, not APEv2) are supported. .TP -.B replaygain_preamp <-15 to 15> +.B replaygain_preamp <\-15 to 15> This is the gain (in dB) applied to songs with ReplayGain tags. .TP .B volume_normalization @@ -227,12 +227,12 @@ is 8192. .TP .B filesystem_charset This specifies the character set used for the filesystem. A list of supported -character sets can be obtained by running "iconv -l". The default is +character sets can be obtained by running "iconv \-l". The default is determined from the locale when the db was originally created. .TP .B id3v1_encoding This specifies the character set which ID3v1 tags are encoded in. A list of -supported character sets can be obtained by running "iconv -l". The default is +supported character sets can be obtained by running "iconv \-l". The default is to let libid3tag convert them (from ISO-8859-1, as the standard specifies) and do no additional conversion. .TP @@ -260,7 +260,7 @@ be used alone to disable all metadata. The default is to use all known tag types except for comments and those starting with "musicbrainz". .TP .B auto_update -This specifies the wheter to support automatic update of music database when +This specifies the whether to support automatic update of music database when files are changed in music_directory. The default is to disable autoupdate of database. .TP @@ -282,7 +282,7 @@ better but requires more processing and higher bandwidth. Default is yes. .TP .B type This specifies the audio output type. See the list of supported outputs in mpd ---version for possible values. +\-\-version for possible values. .TP .B name This specifies a unique name for the audio output. -- cgit v1.2.3