- 29 Sep, 2008 10 commits
-
-
Eric Wong authored
We don't change the song pointer there, either.
-
Eric Wong authored
We don't modify the Song when we delete it
-
Eric Wong authored
It was a huge confusing mess of parameter passing around and around. Add a few extra assertions to ensure we're handling parent/child relationships properly.
-
Eric Wong authored
This is like basename(3) but with predictable semantics independent of C library or build options used. This is also much more strict and does not account for trailing slashes (mpd should never deal with trailing slashes on internal functions).
-
Eric Wong authored
We no longer fork for directory updates, so we no longer have children to reap.
-
Eric Wong authored
Small memory reduction compared to songvec since most users have much fewer dirs than songs, but still nice to have.
-
Eric Wong authored
We no longer for for updates
-
Eric Wong authored
"free" implies the songvec structure itself is freed, which is not the case.
-
Eric Wong authored
-
Eric Wong authored
If we updated the mpd metadata database; then there's a chance some of those songs in the playlist will have updated metadata. So be on the safe side and increment the playlist version number if _any_ song changed (this is how all released versions of mpd did it, too). This bug was introduced recently when making "update" threaded. Thanks to stonecrest for the bug report.
-
- 28 Sep, 2008 6 commits
-
-
Max Kellermann authored
Make the code more readable by moving the range checks to pcm_range(). gcc does quite a good job at optimizing it: the resulting binary is exactly the same, although it contains a parametrized shift instead of hard-coded boundaries.
-
Max Kellermann authored
Merge some code into an inline function, so we can optimize it later only once.
-
Max Kellermann authored
Patch 9a5b5998 broke the "outputenabled" value of the "outputs" response. Make it print "1" if the output is enabled, "0" otherwise.
-
Eric Wong authored
* spaces => tabs * long lines wrapped * trailing whitespace killed
-
Eric Wong authored
-
Eric Wong authored
-
- 26 Sep, 2008 3 commits
-
-
Max Kellermann authored
There was a known deadlocking bug in the notify library: when the other thread set notify->pending after the according check in notify_wait(), the latter thread was deadlocked. Resolve this by synchronizing all accesses to notify->pending with the notify object's mutex. Since notify_signal_sync() was never used, we can remove it. As a consequence, we don't need notify_enter() and notify_leave() anymore; eliminate them, too.
-
Max Kellermann authored
SongList has been superseded by struct songvec.
-
Max Kellermann authored
During debugging, I found a deadlock between flushAudioBuffer() and the audio_output_task(): audio_output_task() didn't notice that there is a command, and flushAudioBuffer() waited forever in notify_wait(). I am not sure yet what is the real cause; work around this for now by waking up non-finished audio outputs in every iteration.
-
- 25 Sep, 2008 1 commit
-
-
Max Kellermann authored
Due to a merge error, I broke the function handleUpdate(). It did not do anything for the global update, and it did not send a proper response to the client. This patch fixes both bugs.
-
- 24 Sep, 2008 15 commits
-
-
Max Kellermann authored
To check whether a device is really on or off, we should rather check audio_output.open, instead of managing another variable. Wrap audio_output.open in the inline function audio_output_is_open() and use it instead of DEVICE_ON and DEVICE_OFF.
-
Max Kellermann authored
Send an output buffer to all output plugins at the same time, instead of waiting for each of them separately. Make several functions non-blocking, and introduce the new function audio_output_wait_all() to synchronize with all audio output threads.
-
Max Kellermann authored
Why send tags to a device which isn't enabled?
-
Max Kellermann authored
-
Max Kellermann authored
-
Max Kellermann authored
We have eliminated direct accesses to the audio_output struct from the all output plugins. Make it opaque for them, and move its real declaration to output_internal.h, similar to decoder_internal.h. Pass the opaque structure to plugin.init() only, which will return the plugin's data pointer on success, and NULL on failure. This data pointer will be passed to all other methods instead of the audio_output struct.
-
Max Kellermann authored
The JACK output plugin needs to reset its "opened" flag when the JACK server fails. To prevent it from accessing the audio_output struct directly introduce the API function audio_output_closed().
-
Max Kellermann authored
Reduce direct accesses to the audio_output struct from the plugins: this time, eliminate all accesses to audio_output.name. The name is required by some plugins for log messages.
-
Max Kellermann authored
Since the output plugin returns a value indicating success or error, we can have the output core code assign the "open" flag.
-
Max Kellermann authored
Pass the globally configured audio_format as a const pointer to plugin.init(). plugin.open() gets a writable pointer which contains the audio_format requested by the plugin. Its initial value is either the configured audio_format or the input file's audio_format.
-
Max Kellermann authored
To keep I/O nastiness and latencies away from the core, move the audio output code to a separate thread, one per output. The thread is created on demand, and currently runs until mpd exits.
-
Max Kellermann authored
With the macro NOTIFY_INITIALIZER, you can statically initialize a notify object.
-
Max Kellermann authored
Destroy the mutex when it is not used anymore.
-
Max Kellermann authored
When a mutex cannot be created, there must be something very wrong. Induce panic and abort MPD in this case.
-
Max Kellermann authored
"struct notify" is the same as the "Notify" typedef. It can be forward-declared and has a lower case name.
-
- 23 Sep, 2008 5 commits
-
-
Max Kellermann authored
-
Max Kellermann authored
With patch 8d2830b3, I broke "addid": it did not return the id of the new song, because of a typo in the return condition (== instead of !=).
-
Max Kellermann authored
chunk_length can be converted to a local variable, because it is always reset to 0 after it was used.
-
Max Kellermann authored
Since flacSendChunk() is a trivial function and is only used in one location, move the code there. The advantage is that calling decoder_data() directly returns the decoder_command value, so we can eliminate one decoder_get_command() call.
-
Max Kellermann authored
Support for bit rates except 16 bits (and 8 bits on little endian) has always been broken. Since we added optimized functions for 8, 16, 24/32 bits, we can remove the generic flac_convert() function. Instead of removing it, convert it to a wrapper function for flac_convert_*().
-