Commit Graph

3010 Commits

Author SHA1 Message Date
Max Kellermann
d85184256e main: destroy the save_state timer on exit
Make valgrind happier.
2008-11-25 17:55:04 +01:00
Max Kellermann
7918785c78 output: use GLib instead of log.h/util.h 2008-11-25 17:47:46 +01:00
Max Kellermann
0277921e6a oss: use GLib instead of utils.h/log.h 2008-11-25 17:43:28 +01:00
Max Kellermann
b76f7b769c mvp: use GLib instead of utils.h/log.h 2008-11-25 17:37:12 +01:00
Max Kellermann
be60ff83f7 shout: use GLib instead of utils.h/log.h 2008-11-25 17:25:41 +01:00
Max Kellermann
125dad7119 shout: don't check HAVE_SHOUT
If the shout plugin is disabled, shout_plugin.c isn't compiled at all,
no need to check the macro definition.
2008-11-25 17:19:42 +01:00
Marc Pavot
fd1144145c player: set elapsed=0 at song change
I have found something that looks like a bug in MPD:
- When a song is finished, the next one is played and the 'player'
  event is emitted.
- When the client sends the status command just after this event, the
  songid is the new one but the 'elapsed' time is not reseted to 0.

This is problem because I have implemented the solution using a timer
on client side to compute the elapsed time but with this bug the
elapsed time continues to be incremented on a new song.
2008-11-25 16:19:53 +01:00
Max Kellermann
c570aa20fa ao: print error message when ao_open_live() fails
When ao_open_live() failed, MPD would ignore the error code in
"errno".  Make it print a meaningful error message.
2008-11-25 16:18:06 +01:00
Max Kellermann
423276a384 ao: support all libao error codes
The function audioOutputAo_error() did not implement all possible
libao error codes.  Support the rest of them, and fall back to
strerror().
2008-11-25 16:17:48 +01:00
Max Kellermann
ffc604498e ao: use GLib instead of utils.h/log.h 2008-11-25 16:10:01 +01:00
Max Kellermann
bc55d8d78e decoder: added missing glib.h include 2008-11-25 15:12:00 +01:00
Thomas Jansen
2555176854 tag_id3.h: replaced mpd_unused by G_GNUC_UNUSED 2008-11-24 14:57:30 +01:00
Thomas Jansen
bc74503a69 command.c: replaced mpd_unused by G_GNUC_UNUSED 2008-11-24 14:55:32 +01:00
Thomas Jansen
843ed730c0 client.c: replaced mpd_unused by G_GNUC_UNUSED 2008-11-24 14:48:32 +01:00
Thomas Jansen
b9fefc4564 player_thread.c: replaced mpd_unused by G_GNUC_UNUSED 2008-11-24 14:47:44 +01:00
Thomas Jansen
3742cf3abb update.c: replaced mpd_unused by G_GNUC_UNUSED 2008-11-24 14:46:10 +01:00
Thomas Jansen
02273d96c3 sig_handlers.c: replaced mpd_unused by G_GNUC_UNUSED 2008-11-24 14:45:32 +01:00
Thomas Jansen
87751ddbd0 pcm_resample_fallback.c: replaced mpd_unused by G_GNUC_UNUSED 2008-11-24 14:44:17 +01:00
Thomas Jansen
34b1a9061e dbUtils.c: replaced mpd_unused by G_GNUC_UNUSED 2008-11-24 14:42:47 +01:00
Thomas Jansen
3d258504a1 decoder_thread.c: replaced mpd_unused by G_GNUC_UNUSED 2008-11-24 14:41:53 +01:00
Thomas Jansen
f7d995f807 zeroconf.c: replaced mpd_unused by G_GNUC_UNUSED 2008-11-24 14:40:40 +01:00
Thomas Jansen
b31b334ba6 input_file.c: replaced mpd_unused by G_GNUC_UNUSED 2008-11-24 14:33:46 +01:00
Thomas Jansen
f0e621bcdb input_curl.c: replaced mpd_unused by G_GNUC_UNUSED 2008-11-24 14:33:25 +01:00
Thomas Jansen
7c7b0431fe decoder_api.c: replaced mpd_unused by G_GNUC_UNUSED 2008-11-24 14:32:53 +01:00
Thomas Jansen
c6a63f1397 main_notify.c: replaced mpd_unused by G_GNUC_UNUSED 2008-11-24 14:32:02 +01:00
Max Kellermann
14e121af90 flac, mpc, ogg, wavpack: include unistd.h for SEEK_SET
SEEK_SET is defined by unistd.h.  Explicitly include it.
2008-11-24 10:33:08 +01:00
Max Kellermann
acbfba0698 player: disable music_pipe_check_format()
The music pipe audio format bugs seem to be fixed (hopefully).
Disable music_pipe_check_format() for now, since it consumes a lot of
CPU cycles.
2008-11-24 09:25:48 +01:00
Avuton Olrich
29dd5b4aa5 MPD version 0.14~beta1 2008-11-23 12:53:43 -08:00
Marc Pavot
a27a063691 command: added documentation for idle subscriptions 2008-11-23 18:48:11 +01:00
Max Kellermann
fa7a2f0ccc Makefile.am: include protocol.xml in source tarball
Added $(DOCBOOK_FILES) to $(EXTRA_DIST).  Don't include the generated
protocol.html in the tarball.
2008-11-23 18:48:08 +01:00
Max Kellermann
116662e5a9 update: fixed shadow warning on "basename"
Renamed the local variable "basename", which shadows the POSIX
function basename().
2008-11-22 14:57:08 +01:00
Max Kellermann
d9b3efa6a1 autogen.sh: removed libtoolize
Since we don't use libtool anymore, autogen.sh shouldn't call libtoolize.
2008-11-22 14:57:06 +01:00
Max Kellermann
d0779e71ab command: format strerror() with "%s"
We shouldn't pass strerror() where a format string is expected.
2008-11-22 14:57:00 +01:00
Laszlo Ashin
a493aafe02 wavpack: use assert_static() 2008-11-22 14:28:11 +01:00
Laszlo Ashin
457a6f4bee utils: introduce assert_static()
assert_static() will help us to find false asserts in compile time. Of
course it only works in case of expressions which can be evaluated
compile time. It cannot be used in global scope.
2008-11-22 14:28:11 +01:00
Marc Pavot
0bad84066b command: allow clients to subscribe to specific idle events
The client may provide the names of idle events as arguments to the
"idle" command to inform MPD that it is only interested in these
events.
2008-11-22 13:26:21 +01:00
Max Kellermann
976d5045c6 decoder: check audio_format_valid() in all decoders
Refuse to play audio formats which are not supported by MPD.
2008-11-21 20:27:30 +01:00
Max Kellermann
be9e60d55e audio_format: added audio_format_valid() 2008-11-21 20:27:05 +01:00
Max Kellermann
774417f12f decoder: ignore decoder_data() calls with length==0
Pushing buffers with a zero length into the MPD core causes failures;
don't let them pass beyond the decoder plugi API.
2008-11-21 20:26:57 +01:00
Max Kellermann
63c3ebee46 flac, oggflac: use GLib instead of utils.h/log.h 2008-11-21 20:15:50 +01:00
Max Kellermann
f15fc4e99a ffmpeg: use GLib instead of log.h 2008-11-21 20:13:41 +01:00
Max Kellermann
4a3a621caf audiofile: use GLib instead of log.h 2008-11-21 20:13:36 +01:00
Max Kellermann
7a2fe930b8 aac: use GLib instead of utils.h/log.h
Removed the superfluous my_usleep() call.
2008-11-21 20:13:26 +01:00
Max Kellermann
0243e1e26d log: print the log_domain 2008-11-21 20:13:00 +01:00
Max Kellermann
1c0c583216 state_file: save state_file every 5 minutes
When MPD quits in a non-clean way, the state file isn't written, and
on the next start, MPD time warps to the previous clean shutdown.
Save the state file every 5 minutes; this will probably be
configurable at a later time.

Note that we don't set a wakeup timer for that: when there is no MPD
traffic, MPD won't wake up to save the state file.  This minor bug is
tolerated, because usually there is no change in MPD's state when the
main thread is idle.
2008-11-21 18:36:33 +01:00
Max Kellermann
695d8051d2 input_curl: try to seek by fast-forwarding the buffer
If the caller attempts to seek only a few bytes forward, chances are
good that the offset is already in the buffer.  In this case, simply
fast-forward the buffer.
2008-11-21 17:10:20 +01:00
Max Kellermann
46df0fd7dc input_curl: moved code to consume_buffer()
Added some assertions.
2008-11-21 16:57:55 +01:00
Max Kellermann
7779e4133a input_curl: don't do temporary calculations with input_stream.offset
If someone calls seek() with an invalid (negative) offset, the curl
implementation of that method returned false, but left this invalid
offset in input_stream.offset.  Move the calculation to a temporary
variable.
2008-11-21 16:56:10 +01:00
Monika Brinkert
a165ee25e8 doc: merged protocol documentation from the wiki
Over the years, a lot of commands have been added to MPD which were
documented only in the wiki
(http://mpd.wikia.com/wiki/Protocol_Reference).  Merge all missing
commands from there.
2008-11-20 22:20:01 +01:00
Monika Brinkert
63a885026a doc: rephrase descriptions
Correct lots of grammar and spelling errors.  Unify some phrases.
2008-11-20 22:20:01 +01:00