aboutsummaryrefslogtreecommitdiffstats
path: root/src/mixer (follow)
Commit message (Collapse)AuthorAgeFilesLines
* output/pulse: don't expose internal struct in public headerMax Kellermann2011-09-171-5/+7
| | | | | Provide _lock() and _unlock() to wrap all accesses from the mixer plugin.
* output/roar: export volume methodsMax Kellermann2011-09-171-32/+3
| | | | Use these instead of exposing the internal roar_t struct.
* mixer/raop: include cleanupMax Kellermann2011-08-311-12/+2
|
* output/raop: remove excessive debug messagesMax Kellermann2011-08-241-1/+0
|
* output/raop: consistently use GErrorMax Kellermann2011-08-241-2/+2
|
* Remove unused headers in Roar plugin.Hans-Kristian Arntzen2011-03-231-4/+0
| | | | Should fix build errors for Win32.
* Merge commit 'release-0.16.2'Max Kellermann2011-03-191-5/+5
|\ | | | | | | | | | | | | Conflicts: Makefile.am NEWS configure.ac
| * general: whitespace cleanupThomas Jansen2011-02-091-5/+5
| | | | | | | | | | Remove trailing whitespace found by this command: find -name '*.[ch]' | xargs grep "[[:space:]]$"
* | RoarAudio output pluginHans-Kristian Arntzen2011-03-161-0/+137
| |
* | copyright year 2011Max Kellermann2011-01-297-7/+7
| |
* | output/raop: new output pluginDustin Puckett2011-01-281-0/+78
|/ | | | Remote Audio Output Protocol (RAOP), for Apple devices.
* mixer: winmm_mixer implementedDenis Krjuchkov2010-10-091-0/+114
|
* Update copyright notices.Avuton Olrich2009-12-316-6/+6
|
* include config.h in all sourcesMax Kellermann2009-11-124-0/+4
| | | | | | 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.
* fd_util: removed creat_cloexec()Max Kellermann2009-11-101-1/+1
| | | | Add a "mode" argument to open_cloexec() instead.
* set the close-on-exec flag on all file descriptorsMax Kellermann2009-11-071-1/+2
| | | | | | | | | | | Added the "fd_util" library, which attempts to use the new thread-safe Linux system calls pipe2(), accept4() and the options O_CLOEXEC, SOCK_CLOEXEC. Without these, it falls back to FD_CLOEXEC, which is not thread safe. This is particularly important for the "pipe" output plugin (and others, such as JACK/PulseAudio), because we were heavily leaking file descriptors to child processes.
* output/pulse: call mixer on state changesMax Kellermann2009-10-232-127/+79
| | | | | | Don't let the mixer plugin "override" the libpulse callbacks. Instead, add a "mixer" attribute to the pulse_output struct, and call the mixer on all interesting events.
* mixer_control: allow methods "open" and "close" to be NULLMax Kellermann2009-10-231-19/+0
| | | | | It's possible to have a mixer implementation which does not explicitly need the methods open() and close().
* mixer/pulse: don't get volume if stream is not yet readyMax Kellermann2009-10-221-3/+3
| | | | Moved the check from pulse_mixer_open() to pulse_mixer_update().
* pulse: code rewrite using the asynchronous libpulse APIMax Kellermann2009-10-211-209/+126
| | | | | | | | This is a complete rewrite of the PulseAudio output plugin. It uses the asynchronous API, which gives us more control over everything. Additionally, it connects to the PulseAudio server on startup, and keeps this connection up while MPD runs. During pause, instead of closing the stream, it enables "cork".
* mixer_plugin: pass audio_output pointer to mixer_plugin.init()Max Kellermann2009-10-214-4/+6
| | | | | This allows the mixer object to access its associated audio output object.
* mixer_plugin: use GError for error handlingMax Kellermann2009-10-204-48/+106
|
* mixer/{oss,alsa}: renamed the mixer source filesMax Kellermann2009-10-202-8/+8
|
* pulse: renamed source filesMax Kellermann2009-10-201-2/+2
|
* mixer/software: new mixer which controls filter/volumeMax Kellermann2009-07-062-0/+157
| | | | | | | This mixer plugin may be used instead of the traditional global software mixer. It integrates with the "volume" filter plugin, and can control the software volume of an audio output which has no hardware mixer.
* alsa_mixer: use g_ascii_strcasecmp() instead of strcasecmp()Max Kellermann2009-04-281-2/+2
| | | | | strcasecmp() is locale dependent, making it a bad choice for internal string comparisons.
* alsa_mixer: add mixer_index optionDaniel Kahn Gillmor2009-04-281-2/+7
| | | | This allows you to select controls with duplicate names.
* pulse_mixer: use PULSE's mainloop lock instead of GMutexMax Kellermann2009-04-251-27/+13
| | | | | | Using two different kinds of locks may result in a race condition with a deadlock. The libpulse callbacks need no locks at all, because the mainloop object can be assumed to be already locked.
* alsa_mixer: call snd_config_update_free_global() in finish()Max Kellermann2009-04-211-1/+3
| | | | | | | | snd_config_update_free_global() frees cached ALSA configuration. This keeps valgrind a little bit more quiet. This patch moves the call from the open() method into the finish() method, which seems more natural: it allows the use of the config cache, and improves the cleanup phase.
* mixer: assert that the new volume value is validMax Kellermann2009-03-272-7/+1
| | | | | Added an assertion in mixer_set_volume(). Removed the range checks from the ALSA and OSS plugins.
* pulse_mixer: protect the struct with a mutexMax Kellermann2009-03-271-1/+29
| | | | | | There are numerous race conditions between the libpulse thread (pulse_mixer.c callbacks) and the rest of MPD. Protect the volatile attributes of the pulse_mixer struct with a mutex to fix that.
* pulse_mixer: return if mixer is offlineMax Kellermann2009-03-271-29/+27
| | | | | Eliminate one indent level. Also remove several debug useless debug messages.
* pulse_mixer: removed superfluous G_GNUC_UNUSED attributesMax Kellermann2009-03-271-4/+4
| | | | Those parameters are used after all.
* pulse_mixer: use local pa_cvolume variable for set_volume()Max Kellermann2009-03-271-2/+3
| | | | | | Don't mess with pulse_mixer.volume for setting the volume. This variable should only be used to transfer the current volume from sink_input_vol() to pulse_mixer_get_volume().
* pulse_mixer: wait for get_volume() operation to completeMax Kellermann2009-03-271-1/+34
| | | | | | | | | | The pa_context_get_sink_input_info() function is asynchronous, and after it returns, libpulse does not guarantee that the operation has completed yet; in fact, it is not likely. Explicitly wait for the operation to complete. The code for the new pulse_wait_for_operation() function was inspired by mplayer and xine code.
* pulse_mixer: adapted code styleMax Kellermann2009-03-271-27/+52
| | | | Use the same code style as the rest of MPD.
* pulse_mixer: removed superfluous initializationsMax Kellermann2009-03-261-7/+2
| | | | | | Don't initialize attributes which are only used in an open mixer. As long as nobody accesses them, their values are uninitialized and undefined.
* pulse_mixer: allocate "volume" staticallyMax Kellermann2009-03-261-10/+6
| | | | | | | The pm->volume attribute was allocated in pulse_mixer_init(), but is never freed. This leaks memory. Instead of adding the g_free() call to pulse_mixer_finish(), let's just make "volume" a static attribute of the pulse_mixer struct. That is easier to deal with.
* pulse_mixer: removed superfluous NULL checks in close()Max Kellermann2009-03-261-12/+4
| | | | | When the MPD core knows that the pulse mixer is open, pm->mainloop and pm->context must be non-NULL.
* pulse_mixer: initialize "online" and "index" in open()Max Kellermann2009-03-261-2/+5
| | | | | The attributes "online" and "index" were not properly reinitialized after a close/open cycle.
* pulse: make configuration strings constMax Kellermann2009-03-261-6/+6
| | | | | | Nobody needs to modify these strings. We can make them const, and convert config_dup_block_string() to config_get_block_string(). This also fixes memory leaks in the pulse mixer.
* pulse: don't check config_param!=NULLMax Kellermann2009-03-261-6/+3
| | | | | The conf.h functions deal well with config_param==NULL and will return the specified default value then.
* pulse_mixer: free libpulse objects on failureMax Kellermann2009-03-261-0/+6
| | | | | When the mixer initialization fails, we have to free the libpulse objects we have already created, to prevent resource leaks.
* pulse_mixer: unlock the mainloop on failureMax Kellermann2009-03-261-0/+2
| | | | | It's illegal to return from pulse_mixer_setup() without unlocking the main loop. In the error handling, that unlock() call was missing.
* pulse_mixer: moved code to pulse_mixer_setup()Max Kellermann2009-03-261-15/+26
| | | | Prepare for adding proper error handling.
* alsa_mixer: initialize "volume_set" in the open() methodMax Kellermann2009-03-261-2/+2
| | | | | | "volume_set" is an attribute which becomes undefined when the mixer is closed. That means, it must be initialized each time the mixer is opened.
* alsa_mixer: removed superfluous checksMax Kellermann2009-03-261-10/+6
| | | | | | The MPD core guarantees that methods are always invoked in a consistent state. This means we can remove lots of checks from the volume methods.
* alsa_mixer: pass default device to config_get_block_string()Max Kellermann2009-03-261-14/+7
| | | | | Instead of replacing NULL with the default device in the open() method, pass the default device to config_get_block_string().
* alsa_mixer: make "device" and "control" constMax Kellermann2009-03-261-6/+5
| | | | Use config_get_block_string() instead of config_dup_block_string().
* oss_mixer: call oss_find_mixer() in init() methodMax Kellermann2009-03-261-25/+26
| | | | Detect misconfiguration during MPD startup.