summaryrefslogtreecommitdiffstats
path: root/polyp/sink.h
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2005-09-15 23:42:56 +0000
committerLennart Poettering <lennart@poettering.net>2005-09-15 23:42:56 +0000
commite1f008f2a395422b0f1e0c931ea1550df853e6e4 (patch)
tree6b130f01398ec72d2166c9bd484cf53cc2632ee7 /polyp/sink.h
parent0c9873e5b3212adc273400ff133e040080ee4b65 (diff)
commit liboil porting changes
git-svn-id: file:///home/lennart/svn/public/pulseaudio/branches/liboil-test@344 fefdeb5f-60dc-0310-8127-8f9354f1896f
Diffstat (limited to 'polyp/sink.h')
-rw-r--r--polyp/sink.h42
1 files changed, 28 insertions, 14 deletions
diff --git a/polyp/sink.h b/polyp/sink.h
index 844af964..a6d7efa1 100644
--- a/polyp/sink.h
+++ b/polyp/sink.h
@@ -30,38 +30,51 @@ struct pa_sink;
#include "sample.h"
#include "idxset.h"
#include "source.h"
-#include "typeid.h"
+#include "channelmap.h"
#define PA_MAX_INPUTS_PER_SINK 6
-enum pa_sink_state {
+typedef enum {
PA_SINK_RUNNING,
PA_SINK_DISCONNECTED
-};
+} pa_sink_state_t;
+
+typedef enum {
+ PA_MIXER_AUTO,
+ PA_MIXER_SOFTWARE,
+ PA_MIXER_HARDWARE
+} pa_mixer_t;
struct pa_sink {
int ref;
- enum pa_sink_state state;
-
uint32_t index;
- pa_typeid_t typeid;
-
- char *name, *description;
- struct pa_module *owner;
struct pa_core *core;
+ pa_sink_state_t state;
+
+ char *name, *description, *driver;
struct pa_sample_spec sample_spec;
+ struct pa_channel_map channel_map;
struct pa_idxset *inputs;
-
+ struct pa_module *owner;
struct pa_source *monitor_source;
-
- pa_volume_t volume;
+ struct pa_cvolume hw_volume, sw_volume;
void (*notify)(struct pa_sink*sink);
pa_usec_t (*get_latency)(struct pa_sink *s);
+ void (*set_volume)(struct pa_sink *s);
+ void (*get_volume)(struct pa_sink *s);
+
void *userdata;
};
-struct pa_sink* pa_sink_new(struct pa_core *core, pa_typeid_t typeid, const char *name, int fail, const struct pa_sample_spec *spec);
+struct pa_sink* pa_sink_new(
+ struct pa_core *core,
+ const char *name,
+ const char *driver,
+ int fail,
+ const struct pa_sample_spec *spec,
+ const struct pa_channel_map *map);
+
void pa_sink_disconnect(struct pa_sink* s);
void pa_sink_unref(struct pa_sink*s);
struct pa_sink* pa_sink_ref(struct pa_sink *s);
@@ -77,6 +90,7 @@ void pa_sink_notify(struct pa_sink*s);
void pa_sink_set_owner(struct pa_sink *sink, struct pa_module *m);
-void pa_sink_set_volume(struct pa_sink *sink, pa_volume_t volume);
+void pa_sink_set_volume(struct pa_sink *sink, pa_mixer_t m, const struct pa_cvolume *volume);
+const struct pa_cvolume *pa_sink_get_volume(struct pa_sink *sink, pa_mixer_t m);
#endif