aboutsummaryrefslogtreecommitdiffstats
path: root/src (unfollow)
Commit message (Collapse)AuthorFilesLines
2007-07-16Extra debug outputQball Cow1-3/+16
git-svn-id: https://svn.musicpd.org/mpd/trunk@6689 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2007-06-29log: flush the warning log after redirecting stderr to the log filesJ. Alexander Treuman1-0/+1
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-25replayGain: adding DEBUG messages when computing scaleJ. Alexander Treuman1-0/+4
git-svn-id: https://svn.musicpd.org/mpd/trunk@6658 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2007-06-25inputPlugins/wavpack_plugin: enable ReplayGain codeJ. Alexander Treuman1-14/+3
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-25inputPlugins/wavpack_plugin: adding dummy code for ReplayGain supportJ. Alexander Treuman1-4/+84
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-25decode: prefer fileDecodeFunc over streamDecodeFunc for filesJ. Alexander Treuman1-9/+10
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-25Updating Kodest's name/email.J. Alexander Treuman1-1/+1
git-svn-id: https://svn.musicpd.org/mpd/trunk@6654 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2007-06-24Adding WavPack support. Patch courtesy Kodest.J. Alexander Treuman4-1/+426
git-svn-id: https://svn.musicpd.org/mpd/trunk@6651 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2007-06-13Use parsePath for the fifo output's path parameter.J. Alexander Treuman1-9/+9
git-svn-id: https://svn.musicpd.org/mpd/trunk@6623 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2007-06-13Adding parsePath and making parseConfigFilePath use it.J. Alexander Treuman3-48/+65
git-svn-id: https://svn.musicpd.org/mpd/trunk@6622 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2007-06-13Adding FIFO audio output. This is pretty much identical to the old one,J. Alexander Treuman4-1/+303
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-12Use <= when comparing (current time - start time) to a timeout. This wayJ. Alexander Treuman1-2/+2
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-12Make the shout timeout configurable. The default is still 2 seconds.J. Alexander Treuman1-2/+13
git-svn-id: https://svn.musicpd.org/mpd/trunk@6556 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2007-06-12Redoing remiss's shout patch. This time, just block on open() instead ofJ. Alexander Treuman3-106/+30
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-12Load shout first instead of last. This makes it more likely to block otherJ. Alexander Treuman2-2/+2
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-10Load the shout plugin last. This will make sure it's played to last,J. Alexander Treuman2-2/+2
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-09If an audio output is in state DEVICE_ENABLE, and openAudioOutput fails,J. Alexander Treuman1-6/+10
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-09Tidying up some code.J. Alexander Treuman1-17/+10
git-svn-id: https://svn.musicpd.org/mpd/trunk@6527 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2007-06-09Remove a useless if (quit) block. It's enclosed in two while loops: theJ. Alexander Treuman1-4/+0
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-09This should resolve some of the timing issues experienced after switching ↵Roger Bystrøm1-8/+76
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-09switching to us instead of ms on runtimeRoger Bystrøm2-3/+3
git-svn-id: https://svn.musicpd.org/mpd/trunk@6522 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2007-06-09Added timer_get_runtime_ms to know how long the timer has been runningRoger Bystrøm2-1/+10
git-svn-id: https://svn.musicpd.org/mpd/trunk@6521 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2007-06-09Use string concatenation instead of snprintf for the User-Agent HTTPJ. Alexander Treuman1-2/+1
header. git-svn-id: https://svn.musicpd.org/mpd/trunk@6520 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2007-06-09Tidying up some code.J. Alexander Treuman1-12/+14
git-svn-id: https://svn.musicpd.org/mpd/trunk@6519 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2007-06-08dmix fix, don't call snd_pcm_drain unless we're already in the RUNNINGWarren Dukes1-1/+3
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-07Send SIGCONT to the decode process before sending it SIGTERM.J. Alexander Treuman1-0/+1
git-svn-id: https://svn.musicpd.org/mpd/trunk@6503 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2007-06-04Set a flag if we've sent the player process SIGSTOP so that we know not toJ. Alexander Treuman3-3/+11
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-04Don't send the main process SIGUSR1 until we've sent the decode processJ. Alexander Treuman1-1/+2
SIGSTOP. git-svn-id: https://svn.musicpd.org/mpd/trunk@6486 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2007-06-04Don't kill the player process (and effectively the decode process) whenJ. Alexander Treuman5-21/+36
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-04Adding very experimental streaming support for mp4.J. Alexander Treuman1-16/+10
git-svn-id: https://svn.musicpd.org/mpd/trunk@6483 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2007-06-04Use strncasecmp instead of strncmp when comparing HTTP headers. It seemsJ. Alexander Treuman1-6/+6
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-04Add MIME types for the aac and mp4 input plugins. Note that these won'tJ. Alexander Treuman2-6/+8
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-04Cleanup some formatting in decode.c.J. Alexander Treuman1-10/+4
git-svn-id: https://svn.musicpd.org/mpd/trunk@6480 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2007-06-04Actually load the aac input plugin.J. Alexander Treuman2-1/+2
git-svn-id: https://svn.musicpd.org/mpd/trunk@6479 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2007-06-04Don't initialize zeroconf until after we've daemonized and log output hasJ. Alexander Treuman1-3/+2
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-03Removing that space that was recently added to the "Icy-Metadata: 1" HTTPJ. Alexander Treuman1-1/+1
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-03Define HAVE_ZEROCONF if Avahi or Bonjour support is enabled, so that we canJ. Alexander Treuman1-0/+2
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-03Oops, forgot to test that last bool commit. Fixing an error and warning.J. Alexander Treuman1-4/+4
git-svn-id: https://svn.musicpd.org/mpd/trunk@6470 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2007-06-03Making some bool options more consistent.J. Alexander Treuman4-14/+29
git-svn-id: https://svn.musicpd.org/mpd/trunk@6468 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2007-06-03allow zeroconf to be disabled.Patrik Weiskircher3-0/+11
git-svn-id: https://svn.musicpd.org/mpd/trunk@6467 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2007-06-02Adding a missing include.J. Alexander Treuman1-0/+1
git-svn-id: https://svn.musicpd.org/mpd/trunk@6462 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2007-06-02Removing some commented code that wrote HTTP streams to stdout.J. Alexander Treuman1-4/+0
git-svn-id: https://svn.musicpd.org/mpd/trunk@6461 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2007-06-02Added Bonjour zeroconf support. This works now natively on MacOS X.Patrik Weiskircher1-10/+106
I couldn't test mDNSResponder support on Linux, as Debian doesn't include it - but should work as well. git-svn-id: https://svn.musicpd.org/mpd/trunk@6453 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2007-06-02Someone forgot a space in the "Icy-Metadata: 1" HTTP header.J. Alexander Treuman1-1/+1
git-svn-id: https://svn.musicpd.org/mpd/trunk@6452 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2007-06-01Tell the player process (and thus also the decode process) to quit whenJ. Alexander Treuman4-3/+29
playback is stopped completely. This means the player process will no longer have to wake up 100 times per second to see if it's been told to start playing (the main process will just spawn a new player process when it needs to). On the downside, this means an extra pair of forks() and the re-initializing of the player and decode processes each time playback is restarted. git-svn-id: https://svn.musicpd.org/mpd/trunk@6446 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2007-06-01Removing the getBoundPort() function and just making boundPort an extern.J. Alexander Treuman3-9/+4
git-svn-id: https://svn.musicpd.org/mpd/trunk@6445 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2007-06-01Minor formatting cleanups.J. Alexander Treuman2-7/+0
git-svn-id: https://svn.musicpd.org/mpd/trunk@6444 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2007-05-30Only call finishDriverFunc if there is one. The null plugin doesn't haveJ. Alexander Treuman1-1/+2
one now, and trying to call NULL was causing a segfault at exit. git-svn-id: https://svn.musicpd.org/mpd/trunk@6398 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2007-05-30Move the timing code from the null plugin to timer.c, so it can be easilyJ. Alexander Treuman4-76/+146
used in other plugins (fifo, shout, etc.). git-svn-id: https://svn.musicpd.org/mpd/trunk@6397 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2007-05-30Adding a null output plugin.J. Alexander Treuman5-0/+142
git-svn-id: https://svn.musicpd.org/mpd/trunk@6393 09075e82-0dd4-0310-85a5-a0d7c8717e4f