aboutsummaryrefslogtreecommitdiff
path: root/src/mixer_api.h
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2009-03-26 19:43:18 +0100
committerMax Kellermann <max@duempel.org>2009-03-26 19:43:18 +0100
commit617a4fd2d2eff45393c4e243129a4648822d5d86 (patch)
tree0b11f58f1dd145a273378e31a5ba8506251abe97 /src/mixer_api.h
parent7475ded935a00d790d4e97ecf55f4fb3306d80fb (diff)
mixer: added flag "open"
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.
Diffstat (limited to 'src/mixer_api.h')
-rw-r--r--src/mixer_api.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/mixer_api.h b/src/mixer_api.h
index 9af49cd8..344d0445 100644
--- a/src/mixer_api.h
+++ b/src/mixer_api.h
@@ -33,6 +33,11 @@ struct mixer {
* implementation, so plugins don't have to deal with that.
*/
GMutex *mutex;
+
+ /**
+ * Is the mixer device currently open?
+ */
+ bool open;
};
void