aboutsummaryrefslogtreecommitdiffstats
path: root/src/mixer_control.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* mixer: don't reopen failed mixer automaticallyMax Kellermann2009-03-261-2/+6
| | | | | | 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-261-0/+16
| | | | | 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-261-4/+37
| | | | | | | | | | | | 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-261-9/+7
| | | | | | 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-141-3/+28
| | | | | | | 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-141-0/+76
| | | | | | 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-141-61/+0
|
* all: Update copyright header.Avuton Olrich2009-03-131-3/+4
| | | | | | | | 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-121-0/+6
| | | | When an audio output device is disabled, also disable its mixer.
* audio: converted device number check to assertionMax Kellermann2009-03-121-4/+4
| | | | | 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-121-0/+77