- 06 Jul, 2009 2 commits
-
-
Max Kellermann authored
This patch adds initial filter support for audio outputs. Each audio output gets a "filter" attribute, which is used by ao_play_chunk(). The PCM conversion is now performed by convert_filter_plugin. audio_output.convert_state has been removed.
-
Max Kellermann authored
REOPEN is called when the input audio format changes. The output thread may be reconfigure the PCM converter.
-
- 21 Apr, 2009 1 commit
-
-
Max Kellermann authored
For non-global mixers (only "pulse" currently), close the mixer when MPD playback is paused.
-
- 26 Mar, 2009 2 commits
-
-
Max Kellermann authored
Remember if a mixer object is open or closed. Don't call open() again if it is already open. This guarantees that the mixer plugin is always called in a consistent state, and we will be able to remove lots of checks from the implementations. To support mixers which are automatically opened even if the audio output is still closed (to set the volume before playback starts), this patch also adds the "global" flag to the mixer_plugin struct. Both ALSA and OSS set this flag, while PULSE does not.
-
Max Kellermann authored
The mixer core library is now responsible for creating and managing the mixer object. This removes duplicated code from the output plugins.
-
- 20 Mar, 2009 2 commits
-
-
Max Kellermann authored
To prevent a race condition, close the output thread before assigning the new audio format.
-
Max Kellermann authored
The config_audio_format used to contain the configured audio format, which is copied to out_audio_format. Let's convert the former to a boolean, which indicates whether out_audio_format was already set. This simplifies some code and saves a few bytes.
-
- 13 Mar, 2009 1 commit
-
-
Avuton Olrich authored
This updates the copyright header to all be the same, which is pretty much an update of where to mail request for a copy of the GPL and the years of the MPD project. This also puts all committers under 'The Music Player Project' umbrella. These entries should go individually in the AUTHORS file, for consistancy.
-
- 10 Mar, 2009 1 commit
-
-
Max Kellermann authored
This function was part of a workaround which we don't need anymore.
-
- 09 Mar, 2009 2 commits
-
-
Max Kellermann authored
Instead of passing individual buffers to audio_output_all_play(), pass music_chunk objects. Append all those chunks asynchronously to a music_pipe instance. All output threads may then read chunks from this pipe. This reduces MPD's internal latency by an order of magnitude.
-
Max Kellermann authored
audio_output_open() is only called by audio_output_update(). Don't export it.
-
- 07 Mar, 2009 1 commit
-
-
Max Kellermann authored
audio_output_all_update() returns true when there is at least open output device which is open.
-
- 28 Feb, 2009 1 commit
-
-
Max Kellermann authored
time() is not a monotonic timer, and MPD might get confused by clock skews. clock_gettime() provides a monotonic clock, but is not portable to non-POSIX systems (i.e. Windows). This patch uses GLib's GTimer API, which aims to be portable.
-
- 23 Feb, 2009 1 commit
-
-
Max Kellermann authored
The meaning of the chunk depends on the audio format; don't suggest a specific format by declaring the pointer as "char*", pass "void*" instead.
-
- 16 Feb, 2009 1 commit
-
-
Max Kellermann authored
Similar to the decoder plugin API: added wrapper functions to increase code readability.
-
- 15 Feb, 2009 1 commit
-
-
Max Kellermann authored
Renamed variables.
-
- 10 Feb, 2009 1 commit
-
-
Max Kellermann authored
Renamed audio_output struct members.
-
- 17 Jan, 2009 1 commit
-
-
Max Kellermann authored
Removed yet another superfluous buffer layer: return the PCM buffer from pcm_convert() instead of copying PCM data into the caller-supplied buffer.
-
- 07 Jan, 2009 3 commits
-
-
Max Kellermann authored
Be sure that the output thread has quite before we start destructing the output object.
-
Max Kellermann authored
Free memory allocated by the notify object (GMutex, GCond) when it's not used by the output object anymore.
-
Max Kellermann authored
All what's left in pcm_utils.h is the pcm_range() utility function, which is only used internally by pcm_volume and pcm_mix.
-
- 28 Dec, 2008 2 commits
-
-
Thomas Jansen authored
-
Thomas Jansen authored
-
- 27 Dec, 2008 1 commit
-
-
Max Kellermann authored
Don't use NOTIFY_INITIALIZER to initialize audio_output_client_notify.
-
- 02 Nov, 2008 1 commit
-
-
Max Kellermann authored
Nobody should call playAudio() with an empty chunk. Add some assertions on that.
-
- 29 Oct, 2008 4 commits
-
-
Max Kellermann authored
Since open() and play() close the device on error, we can simply check audio_output.open instead of audio_output.result after a call.
-
Max Kellermann authored
When one of several output devices failed, MPD tried to reopen it quite often, wasting a lot of resources. This patch adds a delay: wait 10 seconds before retrying. This might be changed to exponential delays later, but for now, it makes the problem go away.
-
Max Kellermann authored
Moved code from syncAudioDeviceStates() to audio_output_update().
-
Max Kellermann authored
Don't return 0/-1 on success/error, but true/false. Instead of int, use bool for storing flags.
-
- 08 Oct, 2008 1 commit
-
-
Max Kellermann authored
When there are standardized headers, use these instead of the bloated os_compat.h.
-
- 29 Sep, 2008 1 commit
-
-
Max Kellermann authored
pause() puts the audio output into pause mode: if supported, it may perform a special action, which keeps the device open, but does not play anything. Output plugins like "shout" might want to play silence during pause, so their clients won't be disconnected. Plugins which do not support pausing will simply be closed, and have to be reopened when unpaused. This pach includes an implementation for the shout plugin, which sends silence chunks.
-
- 26 Sep, 2008 1 commit
-
-
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.
-
- 24 Sep, 2008 3 commits
-
-
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
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
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.
-
- 11 Sep, 2008 3 commits
-
-
Max Kellermann authored
If the output device is already open, it may have modified outAudioFormat; in this case, outAudioFormat is still valid, and does not need an overwrite.
-
Max Kellermann authored
Eliminate sameInAndOutFormats and check with audio_format_equals() each time it this information is needed. Another 4 bytes saved.
-
Max Kellermann authored
Instead of checking convertAudioFormat, we can simply check if reqAudioFormat is defined. This saves 4 bytes in the struct.
-
- 09 Sep, 2008 2 commits
-
-
Max Kellermann authored
Rename it to audio_format_equals() and return "true" if they are equal.
-
Max Kellermann authored
The "!src" check in copyAudioFormat() used to hide bugs - one should never pass NULL to it. There is one caller which might pass NULL, add a check in this caller. Instead of doing mempcy(), we can simply assign the structures, which looks more natural.
-