- 30 Jan, 2009 4 commits
-
-
Max Kellermann authored
If no ports are configured, don't overwrite the (NULL) configuration with the port names of the first JACK server. If the server changes after a JACK reconnect, MPD won't attempt to auto-detect again.
-
Max Kellermann authored
Currently, the JACK plugin manipulates the audio_format struct which was passed to the open() method. This is very likely to break, because the plugin must not permanently store this pointer. After this patch, MPD ignores sample rate changes. It looks like other software is doing the same, and I guess this is a non-issue. This patch converts the audio_format pointer within jack_data into a static audio_format struct.
-
Max Kellermann authored
jack_set_info_function() is not provided by older libjack versions. Attempt to detect if it is available.
-
Max Kellermann authored
Use jack_set_info_function() to install an info callback. Don't let libjack print them to stderr.
-
- 29 Jan, 2009 13 commits
-
-
Max Kellermann authored
Return false from mpd_jack_play(), let the MPD core close the device.
-
Max Kellermann authored
Don't leave uninitialized bytes in the jack_data struct.
-
Max Kellermann authored
When MPD stops playback, close the JACK client connection.
-
Max Kellermann authored
The "bps" attribute is calculated, but never used.
-
Max Kellermann authored
Return true/false instead of 1/-1.
-
Max Kellermann authored
Preparation for supporting other channel numbers than stereo: use loops instead of duplicating code for the second channel. Most likely, gcc will unroll these loops, so the binary won't be any different.
-
Max Kellermann authored
When jack_get_ports() returns NULL, we cannot have any ports to connect to, and the device cannot play anything.
-
Max Kellermann authored
libjack's jack_port_name() function returns the effective port name, we don't need to do it manually.
-
Max Kellermann authored
Do the global libjack initialization in the global plugin initialization function.
-
Max Kellermann authored
When waiting for free space in the ring buffer, the JACK plugin sleeped 10ms until there is enough space. This delay was too large for low-latency setups (<10ms), and created a lot of xruns. Work around that by reducing the sleep time to 1ms. A proper solution for this would be to use an event based approach, and we will do it, just not now.
-
Max Kellermann authored
When the connection failed once, you had to restart MPD, because it never cleared the jack_data.shutdown flag. Instead, it refused to play anything "because there is no client thread" (which is wrong at that point).
-
Max Kellermann authored
If the ring buffers are allocated after jack_activate(), mpd_jack_process() might segfault because it attempts to access them.
-
Max Kellermann authored
Call jack_port_register() before jack_activate().
-
- 25 Jan, 2009 3 commits
-
-
Max Kellermann authored
On some platforms, g_free() must be used for memory allocated by GLib. This patch intends to correct a lot of occurrences, but is probably not complete.
-
Max Kellermann authored
Return the default value in the conf_get_block_*() functions when param==NULL was passed. This simplifies a lot of code, because all initialization can be done in one code path, regardless whether configuration is present.
-
Max Kellermann authored
All config_get_block_*() functions should accept constant config_param pointers.
-
- 18 Jan, 2009 4 commits
-
-
Max Kellermann authored
Eliminate some more getBlockParam() invocations.
-
Max Kellermann authored
This replaces lots of getBlockParam() invocations.
-
Max Kellermann authored
Don't modify the configured string.
-
Max Kellermann authored
Determine the audio output name with audio_output_get_name() instead of obtaining the name from the configuration again.
-
- 17 Jan, 2009 1 commit
-
-
Max Kellermann authored
Renamed functions, types, variables.
-
- 02 Jan, 2009 2 commits
-
-
Max Kellermann authored
-
Max Kellermann authored
JACK documentation states: "The caller is responsible for calling free(3) any non-NULL returned value." This does not seem to include the array elements. Duplicate them after jack_get_ports(), and free only the array. Convert JackData.output_ports to non-const.
-
- 01 Jan, 2009 1 commit
-
-
Max Kellermann authored
Use GLib's G_GNUC_UNUSED instead of gcc.h's mpd_unused.
-
- 29 Dec, 2008 1 commit
-
-
Max Kellermann authored
-
- 01 Nov, 2008 1 commit
-
-
Max Kellermann authored
Make the pointers "device" and "name" non-const, so we don't need the xfree() hack. The default value is expressed as NULL.
-
- 29 Oct, 2008 1 commit
-
-
Max Kellermann authored
Don't return 0/-1 on success/error, but true/false. Instead of int, use bool for storing flags.
-
- 26 Oct, 2008 2 commits
-
-
Max Kellermann authored
Don't compile the sources of disabled output plugins at all.
-
Max Kellermann authored
Again, no CamelCase in the directory name.
-
- 24 Oct, 2008 7 commits
-
-
Max Kellermann authored
When the audio source provides 24 bit samples, don't bother to convert (lossily) them to 16 bit before jack's floating point conversion - go directly from 24 bit to float.
-
Max Kellermann authored
Move sample format dependent code to a separate function.
-
Max Kellermann authored
Renamed all variables and functions. Add the prefix "mpd_jack_" to function names.
-
Max Kellermann authored
We must never pass partial frames. Added assertions to debug this.
-
Max Kellermann authored
Merge the variables "avail_data" and "avail_frames" into "available". Both variables are never used at the same time.
-
Max Kellermann authored
The JACK documentation postulates that the process() callback must not block, therefore locking is forbidden. Anyway, the old code was racy. Remove all locks, and don't wait for more data to become available - just send to the port what is already in the buffer.
-
Max Kellermann authored
Don't wait until there is room for the full data chunk passed to jack_playAudio(). Try to incrementally send as much as possible into the ring buffer.
-