aboutsummaryrefslogtreecommitdiff
path: root/src/mixer_control.c
Commit message (Collapse)AuthorAge
* copyright year 2011Max Kellermann2011-01-29
|
* Update copyright notices.Avuton Olrich2009-12-31
|
* Merge branch 'v0.15.x'Max Kellermann2009-12-14
|\ | | | | | | | | Conflicts: src/decoder/ffmpeg_plugin.c
| * mixer: explicitly close all mixers on shutdownMax Kellermann2009-12-08
| | | | | | | | | | | | Mixers with the "global" flag set aren't closed automatically when the output device is closed. Thus, they might still be open when MPD shuts down.
* | include config.h in all sourcesMax Kellermann2009-11-12
| | | | | | | | | | | | 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.
* | mixer_control: don't close the mixer if set_volume() failsMax Kellermann2009-10-23
| | | | | | | | | | A mixer is useful enough if it can be read. Setting it may be found unavailable at runtime.
* | mixer_plugin: get_volume() may return -1 if unavailableMax Kellermann2009-10-23
| | | | | | | | | | | | If the method get_volume() returns -1 and no error object is set, then the volume is currently unavailable, but the mixer should not be closed immediately.
* | mixer_control: allow methods "open" and "close" to be NULLMax Kellermann2009-10-23
| | | | | | | | | | It's possible to have a mixer implementation which does not explicitly need the methods open() and close().
* | mixer_plugin: pass audio_output pointer to mixer_plugin.init()Max Kellermann2009-10-21
| | | | | | | | | | This allows the mixer object to access its associated audio output object.
* | mixer_plugin: use GError for error handlingMax Kellermann2009-10-20
| |
* | output: use the software mixer pluginMax Kellermann2009-07-06
|/ | | | | | | | | | Do all the software volume stuff inside each output thread, not in the player thread. This allows one software mixer per output device, and also allows the user to configure the mixer type (hardware or software) for each audio output. This moves the global "mixer_type" setting into the "audio_output" section, deprecating the "mixer_enabled" flag.
* mixer: assert that the new volume value is validMax Kellermann2009-03-27
| | | | | Added an assertion in mixer_set_volume(). Removed the range checks from the ALSA and OSS plugins.
* mixer_control: don't lock the mutex twice in mixer_failed()Max Kellermann2009-03-27
| | | | | | The function mixer_failed() expects the mixer mutex to be already locked, yet it calls mixer_close(), which attempts to lock the mutex again, deadlocking itself.
* mixer: don't reopen failed mixer automaticallyMax Kellermann2009-03-26
| | | | | | If a (global) mixer has been closed due to failure, don't reopen it with every volume get/set. Leave it closed until it is explicitly opened.
* mixer_control: close mixer on failureMax Kellermann2009-03-26
| | | | | When getting or setting the volume fails, the MPD core close the mixer. Moved the duplicated code from the mixer plugins.
* mixer: added flag "open"Max Kellermann2009-03-26
| | | | | | | | | | | | 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.
* mixer_control: don't allow mixer==NULLMax Kellermann2009-03-26
| | | | | | As a side effect, the previous patch added the mixer==NULL checks. It is now illegal to call mixer functions with a NULL argument. Convert the runtime checks to assertions.
* mixer: protect the mixer struct with a mutexMax Kellermann2009-03-14
| | | | | | | In some rare cases, there was a race condition between the output thread and the main thread: when you disable/enable an output device in the main thread, this caused a crash in the output thread. Protect the whole mixer struct with a GMutex to prevent that.
* mixer_api: moved functions to mixer_control.cMax Kellermann2009-03-14
| | | | | | mixer_control.h should provide the functions needed to manipulate a mixer, without exposing the internal mixer API (which is provided by mixer_api.h).
* mixer_control: moved functions to mixer_all.cMax Kellermann2009-03-14
|
* all: Update copyright header.Avuton Olrich2009-03-13
| | | | | | | | 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.
* mixer_control: don't touch mixers of disabled outputsMax Kellermann2009-03-12
| | | | When an audio output device is disabled, also disable its mixer.
* audio: converted device number check to assertionMax Kellermann2009-03-12
| | | | | No caller must ever pass an invalid device number to mixer_control_setvol() or mixer_control_getvol().
* audio: moved mixer functions to mixer_control.cMax Kellermann2009-03-12