Commit Graph

1739 Commits

Author SHA1 Message Date
Qball Cow
e195fb8100 Cleanup a outcommented debug statement
git-svn-id: https://svn.musicpd.org/mpd/trunk@6736 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2007-08-11 11:36:13 +00:00
Qball Cow
4811eadb4a Extra debug output
git-svn-id: https://svn.musicpd.org/mpd/trunk@6689 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2007-07-16 20:31:37 +00:00
J. Alexander Treuman
54e6b27989 log: flush the warning log after redirecting stderr to the log files
Previously, the warning log was only flushed if creating the db or logging
to stdout.  This meant that under normal circumstances (no db creation,
logging to files) the warning log was never flushed.  This caused a bug
when a warning was printed for each call to the status command where the
warning buffer would grow endlessly, eventually using more and more CPU to
reallocate it.

git-svn-id: https://svn.musicpd.org/mpd/trunk@6660 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2007-06-29 18:41:02 +00:00
J. Alexander Treuman
5a2f854914 replayGain: adding DEBUG messages when computing scale
git-svn-id: https://svn.musicpd.org/mpd/trunk@6658 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2007-06-25 14:34:40 +00:00
J. Alexander Treuman
f66b834f8f inputPlugins/wavpack_plugin: enable ReplayGain code
Turns out the fix was as simple as specifying the OPEN_TAGS flag when
opening the file.  Thanks again to Kodest for figuring this one out.

git-svn-id: https://svn.musicpd.org/mpd/trunk@6657 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2007-06-25 14:24:30 +00:00
J. Alexander Treuman
f83d1aa460 inputPlugins/wavpack_plugin: adding dummy code for ReplayGain support
This ReplayGain code is currently disabled because WavpackGetTagItem can't
seem to find replaygain_* fields in APEv2 tags (which is how wvgain stores
ReplayGain values).  Additionally, because APEv2 tags are stored at the end
of the file, this code is only implemented for regular files and not HTTP
streams.  Using HTTP seeking it *may* be possible to implement it for both.

git-svn-id: https://svn.musicpd.org/mpd/trunk@6656 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2007-06-25 13:37:21 +00:00
J. Alexander Treuman
ac5a7c2d82 decode: prefer fileDecodeFunc over streamDecodeFunc for files
Only wavpack implements both fileDecodeFunc and streamDecodeFunc, and it's
fileDecodeFunc provides more functionality.  So try using that first.

This commit also fixes a bug where the plugin test loop wouldn't break once
a suitable plugin was found if it used fileDecodeFunc.

git-svn-id: https://svn.musicpd.org/mpd/trunk@6655 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2007-06-25 13:22:51 +00:00
J. Alexander Treuman
ff6a8e2ade Updating Kodest's name/email.
git-svn-id: https://svn.musicpd.org/mpd/trunk@6654 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2007-06-25 12:13:45 +00:00
J. Alexander Treuman
08ca0ae2e8 Check for pkg-config unconditionally. It might not be needed if we disable
a ton of optional functionality, but it's getting hard to keep track of it
all.  So let's just be lazy.

git-svn-id: https://svn.musicpd.org/mpd/trunk@6653 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2007-06-24 21:31:08 +00:00
J. Alexander Treuman
f31b7b4677 Updating some ./configure --help text.
git-svn-id: https://svn.musicpd.org/mpd/trunk@6652 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2007-06-24 21:26:44 +00:00
J. Alexander Treuman
db47ab163a Adding WavPack support. Patch courtesy Kodest.
git-svn-id: https://svn.musicpd.org/mpd/trunk@6651 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2007-06-24 20:40:04 +00:00
J. Alexander Treuman
df32eed2cc Use parsePath for the fifo output's path parameter.
git-svn-id: https://svn.musicpd.org/mpd/trunk@6623 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2007-06-13 15:37:46 +00:00
J. Alexander Treuman
c734c13b5c Adding parsePath and making parseConfigFilePath use it.
git-svn-id: https://svn.musicpd.org/mpd/trunk@6622 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2007-06-13 15:27:09 +00:00
J. Alexander Treuman
b496239e76 Adding FIFO audio output. This is pretty much identical to the old one,
except that it now uses a timer for throttling.

git-svn-id: https://svn.musicpd.org/mpd/trunk@6621 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2007-06-13 14:15:30 +00:00
J. Alexander Treuman
1928a40486 Adding some ChangeLog entries.
git-svn-id: https://svn.musicpd.org/mpd/trunk@6558 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2007-06-12 18:39:47 +00:00
J. Alexander Treuman
8de17dbed0 Use <= when comparing (current time - start time) to a timeout. This way
if the clock ticks right after we get the start time and the timeout is
only one second, we'll still wait a full second instead of returning
immediately.

git-svn-id: https://svn.musicpd.org/mpd/trunk@6557 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2007-06-12 18:33:26 +00:00
J. Alexander Treuman
6f2be47270 Make the shout timeout configurable. The default is still 2 seconds.
git-svn-id: https://svn.musicpd.org/mpd/trunk@6556 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2007-06-12 18:28:57 +00:00
J. Alexander Treuman
3c5cecb828 Redoing remiss's shout patch. This time, just block on open() instead of
pretending to play while we wait for the connection to timeout.  This
removes the need for timers, and thus removes the now unnecessary
timer_get_runtime_* function(s) from the timer code.

The changes made compared to the pre-patch shout plugin are:
* Block while connecting, timing out after 2 seconds.
* Close the device, and not just the connection, if play returns -1.
* Remove sd->last_err (it's always assigned before use).
* Some minor cleanups.

git-svn-id: https://svn.musicpd.org/mpd/trunk@6555 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2007-06-12 17:58:17 +00:00
J. Alexander Treuman
bd0620ff72 Load shout first instead of last. This makes it more likely to block other
outputs, which is actually desired behaviour.  This way if the shout server
takes a while to respond, the shout output can block until connected
without messing up other audio outputs.

git-svn-id: https://svn.musicpd.org/mpd/trunk@6554 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2007-06-12 17:49:31 +00:00
J. Alexander Treuman
2d8f36cefb Load the shout plugin last. This will make sure it's played to last,
reducing the likelyhood of it blocking other outputs.

git-svn-id: https://svn.musicpd.org/mpd/trunk@6543 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2007-06-10 22:58:56 +00:00
J. Alexander Treuman
4e5cffaa7b If an audio output is in state DEVICE_ENABLE, and openAudioOutput fails,
leave it in that state.  Likewise, if an audio output is in state
DEVICE_ON, and reopening the device due to a format change fails, change it
to state DEVICE_ENABLE.  This will prevent flushAudioBuffer from even
attempting to play audio on a closed device (even though it would fail
anyway).

git-svn-id: https://svn.musicpd.org/mpd/trunk@6529 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2007-06-09 21:40:56 +00:00
J. Alexander Treuman
8feaf84b24 Tidying up some code.
git-svn-id: https://svn.musicpd.org/mpd/trunk@6527 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2007-06-09 19:19:33 +00:00
J. Alexander Treuman
0bfe6cabce Remove a useless if (quit) block. It's enclosed in two while loops: the
top depending on !quit, which doesn't set it anywhere before the if (quit)
block is reached, and the inner one which doesn't set quit at all.  Since
it's a local variable and can't be modified externally, it'll never be hit.

git-svn-id: https://svn.musicpd.org/mpd/trunk@6524 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2007-06-09 16:04:00 +00:00
Roger Bystrøm
d50fc3849a This should resolve some of the timing issues experienced after switching from blocking to non-blocking shout api
* Wait ten seconds before declearing the shout server unreachable
* Fix a state where it would never attempt to connect if it had previously failed

It isn't perfect yet, but I'd like some testing on it from other setups


git-svn-id: https://svn.musicpd.org/mpd/trunk@6523 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2007-06-09 15:51:20 +00:00
Roger Bystrøm
50fbab086a switching to us instead of ms on runtime
git-svn-id: https://svn.musicpd.org/mpd/trunk@6522 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2007-06-09 15:45:36 +00:00
Roger Bystrøm
a886600474 Added timer_get_runtime_ms to know how long the timer has been running
git-svn-id: https://svn.musicpd.org/mpd/trunk@6521 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2007-06-09 14:03:09 +00:00
J. Alexander Treuman
9ccf0d8a25 Use string concatenation instead of snprintf for the User-Agent HTTP
header.

git-svn-id: https://svn.musicpd.org/mpd/trunk@6520 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2007-06-09 13:43:40 +00:00
J. Alexander Treuman
9980d233c4 Tidying up some code.
git-svn-id: https://svn.musicpd.org/mpd/trunk@6519 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2007-06-09 13:34:53 +00:00
Warren Dukes
52a06531fc dmix fix, don't call snd_pcm_drain unless we're already in the RUNNING
state (when users press stop, previous snd_pcm_drop(), then
snd_pcm_drain() was called.  this would lockup dmix)


git-svn-id: https://svn.musicpd.org/mpd/trunk@6517 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2007-06-08 12:44:38 +00:00
J. Alexander Treuman
df95a80fa1 Send SIGCONT to the decode process before sending it SIGTERM.
git-svn-id: https://svn.musicpd.org/mpd/trunk@6503 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2007-06-07 20:02:27 +00:00
J. Alexander Treuman
01faa6f4e3 Set a flag if we've sent the player process SIGSTOP so that we know not to
wait for it to complete an action which it never will.

git-svn-id: https://svn.musicpd.org/mpd/trunk@6488 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2007-06-04 23:14:38 +00:00
J. Alexander Treuman
10860b33d4 Updating ChangeLog.
git-svn-id: https://svn.musicpd.org/mpd/trunk@6487 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2007-06-04 22:43:57 +00:00
J. Alexander Treuman
0e4f418c29 Don't send the main process SIGUSR1 until we've sent the decode process
SIGSTOP.

git-svn-id: https://svn.musicpd.org/mpd/trunk@6486 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2007-06-04 22:36:39 +00:00
J. Alexander Treuman
89eca9eebc Don't kill the player process (and effectively the decode process) when
completely stopped.  Instead, send them SIGSTOP to pause the process until
they're needed again.  Then send them SIGCONT instead of re-spawning them.

git-svn-id: https://svn.musicpd.org/mpd/trunk@6485 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2007-06-04 22:29:55 +00:00
J. Alexander Treuman
4734a2e2b4 Adding very experimental streaming support for mp4.
git-svn-id: https://svn.musicpd.org/mpd/trunk@6483 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2007-06-04 19:24:19 +00:00
J. Alexander Treuman
cbdc0b1534 Use strncasecmp instead of strncmp when comparing HTTP headers. It seems
some versions of shoutcast send "content-type" in all lowercase, and I
don't trust other servers to get the case right for the rest of the headers
we look for.

git-svn-id: https://svn.musicpd.org/mpd/trunk@6482 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2007-06-04 19:02:23 +00:00
J. Alexander Treuman
caa17db85e Add MIME types for the aac and mp4 input plugins. Note that these won't
have any effect until the aac and mp4 input plugins actually support a
stream decoding API.

git-svn-id: https://svn.musicpd.org/mpd/trunk@6481 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2007-06-04 18:57:34 +00:00
J. Alexander Treuman
71094905e3 Cleanup some formatting in decode.c.
git-svn-id: https://svn.musicpd.org/mpd/trunk@6480 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2007-06-04 18:55:46 +00:00
J. Alexander Treuman
4685c782c4 Actually load the aac input plugin.
git-svn-id: https://svn.musicpd.org/mpd/trunk@6479 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2007-06-04 18:54:46 +00:00
J. Alexander Treuman
1b68d00b3b Don't initialize zeroconf until after we've daemonized and log output has
been redirected.  This prevents zeroconf from blocking daemonization, and
makes sure any errors get sent to the logs and not stdout.

git-svn-id: https://svn.musicpd.org/mpd/trunk@6477 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2007-06-04 17:41:18 +00:00
J. Alexander Treuman
652c2fc8b0 Adding ChangeLog entry for zeroconf_enabled, adding Zeroconf section to
mpdconf.example, and updating the zeroconf_* docs.

git-svn-id: https://svn.musicpd.org/mpd/trunk@6474 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2007-06-03 20:09:12 +00:00
J. Alexander Treuman
7e2cbdee05 Removing that space that was recently added to the "Icy-Metadata: 1" HTTP
header.  While this is odd for an HTTP header, it's actually quite common
for streaming clients to send it without a space.  Some clients do send
with a space as well, but without one has always worked fine and may in
fact be more compatible.

git-svn-id: https://svn.musicpd.org/mpd/trunk@6472 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2007-06-03 19:46:03 +00:00
J. Alexander Treuman
d5596a1cf0 Define HAVE_ZEROCONF if Avahi or Bonjour support is enabled, so that we can
silence a warning about an unused variable without using stupid checks for
HAVE_AVAHI || HAVE_BONJOUR.

git-svn-id: https://svn.musicpd.org/mpd/trunk@6471 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2007-06-03 19:44:19 +00:00
J. Alexander Treuman
ab14f8a3c7 Oops, forgot to test that last bool commit. Fixing an error and warning.
git-svn-id: https://svn.musicpd.org/mpd/trunk@6470 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2007-06-03 19:30:37 +00:00
J. Alexander Treuman
f84bfb7c64 ChangeLog entry for Bonjour support.
git-svn-id: https://svn.musicpd.org/mpd/trunk@6469 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2007-06-03 19:27:24 +00:00
J. Alexander Treuman
a6fecd6c05 Making some bool options more consistent.
git-svn-id: https://svn.musicpd.org/mpd/trunk@6468 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2007-06-03 19:25:25 +00:00
Patrik Weiskircher
d67737bc64 allow zeroconf to be disabled.
git-svn-id: https://svn.musicpd.org/mpd/trunk@6467 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2007-06-03 18:08:51 +00:00
J. Alexander Treuman
4025498488 Cleaning up zeroconf configure magic.
git-svn-id: https://svn.musicpd.org/mpd/trunk@6464 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2007-06-03 00:03:20 +00:00
J. Alexander Treuman
e41601c98b Check if we need -ldns_sd for Bonjour.
git-svn-id: https://svn.musicpd.org/mpd/trunk@6463 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2007-06-02 22:58:51 +00:00
J. Alexander Treuman
f3be4e8c91 Adding a missing include.
git-svn-id: https://svn.musicpd.org/mpd/trunk@6462 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2007-06-02 22:52:53 +00:00