| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
| |
git-svn-id: https://svn.musicpd.org/mpd/trunk@6868 09075e82-0dd4-0310-85a5-a0d7c8717e4f
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We want the partial content goodies of HTTP/1.1 without
requiring persistent connections. Persistent connections across
multiple HTTP requests don't really help in the case of MPD,
either, because our content is usually big and heavy.
Note: this puts MPD at the hands of the server to correctly
close() the TCP connection we're using. If we connect to a
rogue server that keeps the connection alive even when request
not to, we'll spin :( However, encountering such a server
is very unlikely...
git-svn-id: https://svn.musicpd.org/mpd/trunk@6867 09075e82-0dd4-0310-85a5-a0d7c8717e4f
|
|
|
|
|
|
| |
We need to SIGCONT the decoder process to allow for seeking
while paused.
git-svn-id: https://svn.musicpd.org/mpd/trunk@6864 09075e82-0dd4-0310-85a5-a0d7c8717e4f
|
|
|
|
|
| |
These haven't been used for several years
git-svn-id: https://svn.musicpd.org/mpd/trunk@6863 09075e82-0dd4-0310-85a5-a0d7c8717e4f
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The problems I had were related to the OSS driver and USB
device I was using. The problems existed even with the old
busy-waiting scheme enabled.
OSS - Bithead USB => bad
ALSA - Bithead USB => OK
OSS - Onboard i8x0 => OK
ALSA - Onboard i8x0 => OK
bad - slow shutdown, pauses, dropped audio after pause/resume
git-svn-id: https://svn.musicpd.org/mpd/trunk@6861 09075e82-0dd4-0310-85a5-a0d7c8717e4f
|
|
|
|
|
|
|
|
| |
Until we can fix it properly (or replace it with a cleaner event
system), I don't want this in trunk. Currently there are
strange pauses when queueing and during shutdown that I can't
seem to figure out right away.
git-svn-id: https://svn.musicpd.org/mpd/trunk@6860 09075e82-0dd4-0310-85a5-a0d7c8717e4f
|
|
|
|
|
|
|
| |
This fixes the problem of playlist moving/changnig while we're paused
Followup to r6822
git-svn-id: https://svn.musicpd.org/mpd/trunk@6859 09075e82-0dd4-0310-85a5-a0d7c8717e4f
|
|
|
| |
git-svn-id: https://svn.musicpd.org/mpd/trunk@6858 09075e82-0dd4-0310-85a5-a0d7c8717e4f
|
|
|
|
|
|
| |
the force flag will issue FATAL() if an invalid value is
specified
git-svn-id: https://svn.musicpd.org/mpd/trunk@6857 09075e82-0dd4-0310-85a5-a0d7c8717e4f
|
|
|
|
|
|
| |
This way we'll avoid listening on fd=0 and have a better
chance of having fd=0 as /dev/null
git-svn-id: https://svn.musicpd.org/mpd/trunk@6852 09075e82-0dd4-0310-85a5-a0d7c8717e4f
|
|
|
|
|
| |
(yes, it helps to actually compile code before committing it)
git-svn-id: https://svn.musicpd.org/mpd/trunk@6851 09075e82-0dd4-0310-85a5-a0d7c8717e4f
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We redirect stdin to /dev/null to work around a libao bug, but
this bug has been fixed in libao since 2003 (according to jat).
However, there are likely other bugs in other libraries (and
even our code!) that handle fd=0 incorrectly and I'd rather not
take the risk[1]. So So it's easiest to just keep
fd=0==/dev/null for now...
[1] - I've seen several of these myself...
git-svn-id: https://svn.musicpd.org/mpd/trunk@6849 09075e82-0dd4-0310-85a5-a0d7c8717e4f
|
|
|
|
|
|
| |
This should fix Debian bug #428551
(mpd crashes when restarting the dbus daemon)
git-svn-id: https://svn.musicpd.org/mpd/trunk@6844 09075e82-0dd4-0310-85a5-a0d7c8717e4f
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Thanks to _noth_ for the patch, this fixes Mantis bug #1534
_noth_ wrote:
> When MPD is launched from a non-interactive shell, it enters an endless
> loop, filling up its error log file with "error accept()'ing" messages.
> This is caused by the fact that stdin is already closed when mpd starts
> up. listenOnPort() opens up the first of its sockets as fd 0 (the first
> empty fd table position). Then, setup_log_output()->redirect_stdin()
> overwrites fd0 (fd=open("/dev/null",...); dup2(fd, STDIN_FILENO);)
> without checking if it corresponds to the actual standard input (or if
> it is open in the first place). This means that listenSockets[0].fd now
> is a fd for /dev/null, thus doIOForInterfaces()->getConnections() can't
> accept(2) on it and fails with the above error. The attached patch fixes
> this for me.
git-svn-id: https://svn.musicpd.org/mpd/trunk@6843 09075e82-0dd4-0310-85a5-a0d7c8717e4f
|
|
|
|
|
|
|
|
|
|
|
|
| |
The host buffer that hostname pointed to is no longer on the
stack by the time the SECURE() message is printed. So make it
static and thus accessible to all. We won't be calling this
stuff in the middle of a child process/thread/task, so there's
no
Also, hostname is a constant string we shouldn't modify, so mark
it as const char *.
git-svn-id: https://svn.musicpd.org/mpd/trunk@6842 09075e82-0dd4-0310-85a5-a0d7c8717e4f
|
|
|
|
|
|
|
|
|
| |
For the default: case, just use the error message that libFLAC
provides instead of using something ambiguous. Also, this gets
rid of long lines in the code, making it easier to digest.
Of course, we save ~100 bytes of text space in the process :)
git-svn-id: https://svn.musicpd.org/mpd/trunk@6830 09075e82-0dd4-0310-85a5-a0d7c8717e4f
|
|
|
|
|
|
| |
We used a bare '15' in several places and it's not immediately
obvious where it came from. This makes it more obvious
git-svn-id: https://svn.musicpd.org/mpd/trunk@6829 09075e82-0dd4-0310-85a5-a0d7c8717e4f
|
|
|
|
|
|
|
|
|
| |
As unfortunate as it is to remove such useful debugging messages, it's
necessary to fix a potential deadlock with signal handling. A bunch of
functions the debug functions call aren't safe to call from a signal
handler. There are some alternate solutions, but they're neither pretty
nor simple. So just remove them entirely for now.
git-svn-id: https://svn.musicpd.org/mpd/trunk@6828 09075e82-0dd4-0310-85a5-a0d7c8717e4f
|
|
|
|
|
|
| |
Using SECURE once without a \n, and again with one, results in a timestamp
mid-line. Let's not do that.
git-svn-id: https://svn.musicpd.org/mpd/trunk@6827 09075e82-0dd4-0310-85a5-a0d7c8717e4f
|
|
|
| |
git-svn-id: https://svn.musicpd.org/mpd/trunk@6826 09075e82-0dd4-0310-85a5-a0d7c8717e4f
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
as with the stop command, this will cause the player and decoder
to suspend and not wake up hundreds of times a second to poll
a variable for wakeup. This will reduce power consumption
on some CPUs while mpd is paused and not playing.
tests:
pause && unpause => OK
pause && stop && play => OK
pause && exit && restart w/statefile && unpause => OK
pause && block sound device && \
unpause => failed to open sound device \
=> still paused and suspended => unblock sound device &&
unpause => OK (playing)
In all cases, the player process releases the audio device
when paused before going into the suspended state.
git-svn-id: https://svn.musicpd.org/mpd/trunk@6822 09075e82-0dd4-0310-85a5-a0d7c8717e4f
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This attribute was set in log.c, but not exported to other
modules in log.h
This allows us to remove some unneccessary variable
initializations that were added in r6277. I did
audioOutput_shout.c a bit differently, to avoid some
jumps.
before:
$ size src/mpd
text data bss dec hex filename
225546 4040 14600 244186 3b9da src/mpd
after:
$ size src/mpd
text data bss dec hex filename
224698 4040 14600 243338 3b68a src/mpd
git-svn-id: https://svn.musicpd.org/mpd/trunk@6821 09075e82-0dd4-0310-85a5-a0d7c8717e4f
|
|
|
|
|
|
|
|
|
|
|
|
| |
Parse ReplayGain info in LAME tags and use it if no ID3v2 ReplayGain tags
are found. This is currently a bit unsafe, as apparently some LAME tags
have bogus ReplayGain values. But I'm finding a lot of MP3s with valid
LAME tags that fail the LAME tag CRC check. So until I figure out why
that's happening, it's an unreliable method for checking if the LAME tag is
valid.
A big thanks to tmz for writing the original patch.
git-svn-id: https://svn.musicpd.org/mpd/trunk@6798 09075e82-0dd4-0310-85a5-a0d7c8717e4f
|
|
|
|
|
|
|
|
|
|
| |
Currently, if we start decoding while the pause flag is set, we open the
audio device and leave it opened, blocking other apps from using it. The
obvious thing to do is to not open the audio device if the pause flag is
set, but the open call also sets the audio format. Therefore I'm leaving
the open call in, and just closing it immediately afterwards if the pause
flag is set.
git-svn-id: https://svn.musicpd.org/mpd/trunk@6745 09075e82-0dd4-0310-85a5-a0d7c8717e4f
|
|
|
| |
git-svn-id: https://svn.musicpd.org/mpd/trunk@6742 09075e82-0dd4-0310-85a5-a0d7c8717e4f
|
|
|
|
|
|
|
| |
The shout plugin will now feign playback until the connect timeout is hit,
preventing connection attempts from blocking playback on local outputs.
Note that this patch is very different from remiss' original one.
git-svn-id: https://svn.musicpd.org/mpd/trunk@6738 09075e82-0dd4-0310-85a5-a0d7c8717e4f
|
|
|
| |
git-svn-id: https://svn.musicpd.org/mpd/trunk@6736 09075e82-0dd4-0310-85a5-a0d7c8717e4f
|
|
|
| |
git-svn-id: https://svn.musicpd.org/mpd/trunk@6689 09075e82-0dd4-0310-85a5-a0d7c8717e4f
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
| |
git-svn-id: https://svn.musicpd.org/mpd/trunk@6658 09075e82-0dd4-0310-85a5-a0d7c8717e4f
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
| |
git-svn-id: https://svn.musicpd.org/mpd/trunk@6654 09075e82-0dd4-0310-85a5-a0d7c8717e4f
|
|
|
| |
git-svn-id: https://svn.musicpd.org/mpd/trunk@6651 09075e82-0dd4-0310-85a5-a0d7c8717e4f
|
|
|
| |
git-svn-id: https://svn.musicpd.org/mpd/trunk@6623 09075e82-0dd4-0310-85a5-a0d7c8717e4f
|
|
|
| |
git-svn-id: https://svn.musicpd.org/mpd/trunk@6622 09075e82-0dd4-0310-85a5-a0d7c8717e4f
|
|
|
|
|
| |
except that it now uses a timer for throttling.
git-svn-id: https://svn.musicpd.org/mpd/trunk@6621 09075e82-0dd4-0310-85a5-a0d7c8717e4f
|
|
|
|
|
|
|
| |
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
|
|
|
| |
git-svn-id: https://svn.musicpd.org/mpd/trunk@6556 09075e82-0dd4-0310-85a5-a0d7c8717e4f
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
| |
reducing the likelyhood of it blocking other outputs.
git-svn-id: https://svn.musicpd.org/mpd/trunk@6543 09075e82-0dd4-0310-85a5-a0d7c8717e4f
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
| |
git-svn-id: https://svn.musicpd.org/mpd/trunk@6527 09075e82-0dd4-0310-85a5-a0d7c8717e4f
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
| |
git-svn-id: https://svn.musicpd.org/mpd/trunk@6522 09075e82-0dd4-0310-85a5-a0d7c8717e4f
|
|
|
| |
git-svn-id: https://svn.musicpd.org/mpd/trunk@6521 09075e82-0dd4-0310-85a5-a0d7c8717e4f
|
|
|
|
|
| |
header.
git-svn-id: https://svn.musicpd.org/mpd/trunk@6520 09075e82-0dd4-0310-85a5-a0d7c8717e4f
|