aboutsummaryrefslogtreecommitdiffstats
path: root/src/output_control.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'v0.16.x'Max Kellermann2011-09-011-5/+25
|\ | | | | | | | | | | Conflicts: configure.ac src/output_control.c
| * output_all: move _lock_signal() to output_control.cMax Kellermann2011-09-011-0/+12
| | | | | | | | Better name, better documentation.
| * output_thread: reimplement CANCEL synchronizationMax Kellermann2011-09-011-5/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The output thread could hang indefinitely after finishing CANCEL, because it could have missed the signal while the output was not unlocked in ao_command_finished(). This patch removes the wait() call after CANCEL, and adds the flag "allow_play" instead. While this flag is set, playback is skipped. With this flag, there will not be any excess wait() call after the pipe has been cleared. This patch fixes a bug that causes mpd to discontinue playback after seeking, due to the race condition described above.
* | output_control: move code to audio_output_destruct()Max Kellermann2011-08-301-17/+2
| | | | | | | | .. and destruct the output object properly in test/run_output.
* | Merge commit 'release-0.16.2'Max Kellermann2011-03-191-0/+1
|\| | | | | | | | | | | | | Conflicts: Makefile.am NEWS configure.ac
| * audio_format, output_thread: add more audio_format_valid() assertionsMax Kellermann2011-03-161-0/+1
| |
* | copyright year 2011Max Kellermann2011-01-291-1/+1
| |
* | output_control: document internal functionsMax Kellermann2011-01-101-0/+17
| |
* | output_control: move code to ao_lock_command()Max Kellermann2011-01-101-9/+15
| |
* | output_control: ao_command() calls ao_command_async()Max Kellermann2011-01-101-7/+6
|/ | | | Merge some code.
* Merge release 0.15.14 from branch 'v0.15.x'Max Kellermann2010-11-071-19/+18
|\ | | | | | | | | | | | | | | | | | | | | | | Conflicts: NEWS configure.ac src/decoder_control.c src/decoder_control.h src/input/rewind_input_plugin.c src/output_control.c src/output_thread.c src/player_thread.c
| * output_control: lock object in audio_output_open()Max Kellermann2010-11-041-6/+19
| | | | | | | | Protect the attributes "open" and "fail_timer".
| * output_control: lock object in audio_output_close()Max Kellermann2010-11-041-2/+28
| | | | | | | | Protect the attributes "open" and "fail_timer".
* | output_thread: call replay gain filter manuallyMax Kellermann2010-05-021-0/+6
| | | | | | | | | | | | Don't add it to the filter chain, because we need to apply replay gain before cross-fading with the next song. Add a second replay_gain filter which is used for the song being faded in (chunk->other).
* | player_thread: move cross-fading to output threadMax Kellermann2010-05-021-0/+2
| | | | | | | | | | Remove cross_fade_apply(), and call pcm_mix() in the output thread, mixing the chunk and chunk->other together.
* | output: added option "always_on" for radio stationsMax Kellermann2010-03-101-1/+14
| | | | | | | | | | | | | | Did you ever accidently click "stop" while feeding a radio station? This option sets the output device to "pause" to disable the "close" method. It falls back to "pause" then, which is specific to the plugin. Some plugins implement it by feeding silence.
* | Update copyright notices.Avuton Olrich2009-12-311-1/+1
| |
* | include config.h in all sourcesMax Kellermann2009-11-121-0/+1
| | | | | | | | | | | | After we've been hit by Large File Support problems several times in the past week (which only occur on 32 bit platforms, which I don't have), this is yet another attempt to fix the issue.
* | output_thread: added command DRAINMax Kellermann2009-11-091-0/+9
| | | | | | | | | | This command manually drains the hardware buffer. This is useful when the player thread want to make sure that everything has been played.
* | output: signal the output thread when CANCEL is finishedMax Kellermann2009-11-021-0/+4
| | | | | | | | | | | | | | After CANCEL, the output thread waits for another signal before it continues playback, to synchronize with the caller. There were some situations where this signal wasn't sent properly. This patch adds an explicit g_cond_signal() at two code positions.
* | {decoder,player}_control: removed duplicate wakeupsMax Kellermann2009-11-021-1/+1
| | | | | | | | | | | | Don't wake up the target thread in every iteration of the wait() loop. Waking it up once, right after the command has been set, must be enough.
* | output_control: fixed deadlock in audio_output_update()Max Kellermann2009-10-291-1/+21
| | | | | | | | Call a version of audio_output_close() which doesn't lock recursively.
* | output: consistently lock audio output objectsMax Kellermann2009-10-291-12/+39
| | | | | | | | | | Always keep the audio_output object locked within the output thread, unless a plugin method is called. This fixes several race conditions.
* | output_plugin: added methods enable() and disable()Max Kellermann2009-10-231-1/+36
| | | | | | | | | | | | | | With these methods, an output plugin can allocate some global resources only if it is actually enabled. The method enable() is called after daemonization, which allows for more sophisticated resource allocation during that method.
* | mixer_plugin: use GError for error handlingMax Kellermann2009-10-201-2/+9
| |
* | Merged release 0.15.2 from branch 'v0.15.x'Max Kellermann2009-08-151-0/+11
|\| | | | | | | | | | | | | Conflicts: NEWS configure.ac
| * output: fixed shout stuck pause bugMax Kellermann2009-08-141-0/+11
| | | | | | | | | | | | Explicitly make the output thread leave the ao_pause() loop. This patch is a workaround, and the "pause" flag is not managed in a thread-safe way, but that's good enough for now.
* | output: attach a filter chain to each audio_outputMax Kellermann2009-07-061-0/+3
| | | | | | | | | | | | | | | | 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.
* | output: added command REOPENMax Kellermann2009-07-061-14/+1
|/ | | | | REOPEN is called when the input audio format changes. The output thread may be reconfigure the PCM converter.
* output_control: close mixer on pauseMax Kellermann2009-04-211-0/+6
| | | | | For non-global mixers (only "pulse" currently), close the mixer when MPD playback is paused.
* mixer: added flag "open"Max Kellermann2009-03-261-1/+2
| | | | | | | | | | | | 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.
* output_plugin: replaced output_plugin.get_mixer() with mixer_pluginMax Kellermann2009-03-261-2/+17
| | | | | | The mixer core library is now responsible for creating and managing the mixer object. This removes duplicated code from the output plugins.
* output_control: close earlier on format mismatchMax Kellermann2009-03-201-3/+3
| | | | | To prevent a race condition, close the output thread before assigning the new audio format.
* output: convert audio_output.config_audio_format to booleanMax Kellermann2009-03-201-9/+5
| | | | | | | 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.
* all: Update copyright header.Avuton Olrich2009-03-131-6/+7
| | | | | | | | 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.
* output_control: removed audio_output_signal()Max Kellermann2009-03-101-6/+0
| | | | This function was part of a workaround which we don't need anymore.
* output: play from a music_pipe objectMax Kellermann2009-03-091-19/+17
| | | | | | | | 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.
* output_control: make audio_output_open() staticMax Kellermann2009-03-091-1/+1
| | | | | audio_output_open() is only called by audio_output_update(). Don't export it.
* output_all: audio_output_all_update() returns boolMax Kellermann2009-03-071-2/+4
| | | | | audio_output_all_update() returns true when there is at least open output device which is open.
* output: use GTimer instead of time_t for reopen after failureMax Kellermann2009-02-281-2/+20
| | | | | | | 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.
* output: pass the music chunk pointer as void*, not char*Max Kellermann2009-02-231-1/+1
| | | | | | 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.
* output_plugin: added inline wrapper functionsMax Kellermann2009-02-161-2/+1
| | | | | Similar to the decoder plugin API: added wrapper functions to increase code readability.
* output_control: no CamelCaseMax Kellermann2009-02-161-44/+44
| | | | Renamed variables.
* output_api: no CamelCase in struct audio_outputMax Kellermann2009-02-101-8/+8
| | | | Renamed audio_output struct members.
* pcm_convert: return PCM buffer from pcm_convert()Max Kellermann2009-01-171-2/+0
| | | | | | Removed yet another superfluous buffer layer: return the PCM buffer from pcm_convert() instead of copying PCM data into the caller-supplied buffer.
* output: join the output thread after sending the KILL commandMax Kellermann2009-01-071-1/+5
| | | | | Be sure that the output thread has quite before we start destructing the output object.
* output: deinitialize notify objectMax Kellermann2009-01-071-0/+2
| | | | | Free memory allocated by the notify object (GMutex, GCond) when it's not used by the output object anymore.
* pcm_utils: moved conversion code to pcm_convert.cMax Kellermann2009-01-071-1/+0
| | | | | 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.
* output: migrate from pthread to glib threadsThomas Jansen2008-12-281-2/+2
|
* Include <pthread.h> where it is necessary onlyThomas Jansen2008-12-281-1/+0
|