- 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 5 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.
-
Max Kellermann authored
Getting rid of CamcelCase, again.
-
Max Kellermann authored
Similar to decoder_control.c, output_control.c will provide functions for controlling the output thread (which will be implemented later).
-
Max Kellermann authored
No CamelCase. Also don't declare typedefs for the methods.
-
- 08 Sep, 2008 1 commit
-
-
Max Kellermann authored
Instead of having to register each output plugin, store them statically in an array. This eliminates the need for the List library here, and saves some small allocations during startup.
-
- 07 Sep, 2008 4 commits
-
-
Max Kellermann authored
Instead of copying all that stuff from the audio output plugin to the audio output structure, store a pointer to the plugin.
-
Max Kellermann authored
Also rename AudioOutputPlugin to struct audio_output_plugin, and use forward declarations to reduce include dependencies.
-
Max Kellermann authored
Just like decoder_api.h, output_api.h provides the audio output API which is used by the plugins.
-
Max Kellermann authored
Get rid of CamelCase, and don't use a typedef, so we can forward-declare it, and unclutter the include dependencies.
-
- 29 Aug, 2008 2 commits
-
-
Max Kellermann authored
Getting rid of CamelCase; not having typedefs also allows us to forward-declare the structures.
-
Max Kellermann authored
And again, convert arguments to const.
-
- 26 Aug, 2008 1 commit
-
-
Max Kellermann authored
We want to expose the AudioFormat structure to plugins; remove some clutter by moving its declaration to a separate header file.
-
- 12 Apr, 2008 5 commits
-
-
Max Kellermann authored
git-svn-id: https://svn.musicpd.org/mpd/trunk@7345 09075e82-0dd4-0310-85a5-a0d7c8717e4f
-
Max Kellermann authored
When growing the audioOutput->convBuffer, we can use free()+malloc() instead of realloc(), which saves a memcpy(). git-svn-id: https://svn.musicpd.org/mpd/trunk@7295 09075e82-0dd4-0310-85a5-a0d7c8717e4f
-
Max Kellermann authored
git-svn-id: https://svn.musicpd.org/mpd/trunk@7294 09075e82-0dd4-0310-85a5-a0d7c8717e4f
-
Max Kellermann authored
The audio output plugins should get a constant pointer, because they must not modify the buffer. Since the size is a non-negative buffer size in bytes, we should change its type to size_t. git-svn-id: https://svn.musicpd.org/mpd/trunk@7293 09075e82-0dd4-0310-85a5-a0d7c8717e4f
-
Max Kellermann authored
In my previous patch set, I forgot to change the pcm_sizeOfConvBuffer() invocation in convertAudioFormat() to also use size_t. git-svn-id: https://svn.musicpd.org/mpd/trunk@7292 09075e82-0dd4-0310-85a5-a0d7c8717e4f
-
- 05 Feb, 2008 1 commit
-
-
Max Kellermann authored
[ew: cleaned up the dirty union hack a bit] Signed-off-by:
Eric Wong <normalperson@yhbt.net> git-svn-id: https://svn.musicpd.org/mpd/trunk@7180 09075e82-0dd4-0310-85a5-a0d7c8717e4f
-
- 03 Jan, 2008 1 commit
-
-
Eric Wong authored
This will make refactoring features easier, especially now that pthreads support and larger refactorings are on the horizon. Hopefully, this will make porting to other platforms (even non-UNIX-like ones for masochists) easier, too. os_compat.h will house all the #includes for system headers considered to be the "core" of MPD. Headers for optional features will be left to individual source files. git-svn-id: https://svn.musicpd.org/mpd/trunk@7130 09075e82-0dd4-0310-85a5-a0d7c8717e4f
-
- 09 Jun, 2007 1 commit
-
-
J. Alexander Treuman authored
git-svn-id: https://svn.musicpd.org/mpd/trunk@6527 09075e82-0dd4-0310-85a5-a0d7c8717e4f
-
- 30 May, 2007 1 commit
-
-
J. Alexander Treuman authored
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
-
- 26 May, 2007 2 commits
-
-
J. Alexander Treuman authored
call to FATAL(). git-svn-id: https://svn.musicpd.org/mpd/trunk@6276 09075e82-0dd4-0310-85a5-a0d7c8717e4f
-
J. Alexander Treuman authored
because lsr may return less than the input buffer size, and the rest of the audio code needs to know the new size. This fixes the clicking that was introduced with recent changes to the lsr code. A huge thanks to remiss for figuring this out. git-svn-id: https://svn.musicpd.org/mpd/trunk@6273 09075e82-0dd4-0310-85a5-a0d7c8717e4f
-
- 24 May, 2007 1 commit
-
-
J. Alexander Treuman authored
audio at once, so it won't work for us. The old full API code was still heavily broken, as each call to pcm_convertSampleRate() used the same state, even if it was processing two streams of audio. The new code keeps a separate state for each audio stream that's being converted. git-svn-id: https://svn.musicpd.org/mpd/trunk@6255 09075e82-0dd4-0310-85a5-a0d7c8717e4f
-
- 22 May, 2007 1 commit
-
-
J. Alexander Treuman authored
and samplerate conversion. This makes the code much easier to read, and fixes a few bugs that were previously there. git-svn-id: https://svn.musicpd.org/mpd/trunk@6224 09075e82-0dd4-0310-85a5-a0d7c8717e4f
-