diff options
Diffstat (limited to '')
-rw-r--r-- | NEWS | 1 | ||||
-rw-r--r-- | doc/mpd.1 | 12 | ||||
-rw-r--r-- | doc/mpd.conf.5 | 12 | ||||
-rw-r--r-- | src/clock.c | 5 | ||||
-rw-r--r-- | src/timer.c | 8 |
5 files changed, 22 insertions, 16 deletions
@@ -22,6 +22,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) * output: @@ -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 <off or album or track or auto> 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 <yes or no> @@ -227,12 +227,12 @@ is 8192. .TP .B filesystem_charset <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 <charset> 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 <yes or no> -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 <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 <name> This specifies a unique name for the audio output. diff --git a/src/clock.c b/src/clock.c index 4100fa2d8..d987aed48 100644 --- a/src/clock.c +++ b/src/clock.c @@ -25,6 +25,9 @@ #include <mach/mach_time.h> #else #include <time.h> +#ifndef CLOCK_MONOTONIC +#include <sys/time.h> +#endif #endif unsigned @@ -89,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 } 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; } |