[polypaudio-commits] r480 - in /trunk/polyp: polyplib-introspect.c polyplib-introspect.h
svnmailer-noreply at 0pointer.de
svnmailer-noreply at 0pointer.de
Tue Feb 14 05:41:31 PST 2006
Author: ossman
Date: Tue Feb 14 14:41:30 2006
New Revision: 480
URL: http://0pointer.de/cgi-bin/viewcvs.cgi?rev=480&root=polypaudio&view=rev
Log:
Fix api. Setting volume is done through a pa_cvolume struct, not a pa_volume_t
scalar.
Modified:
trunk/polyp/polyplib-introspect.c
trunk/polyp/polyplib-introspect.h
Modified: trunk/polyp/polyplib-introspect.c
URL: http://0pointer.de/cgi-bin/viewcvs.cgi/trunk/polyp/polyplib-introspect.c?rev=480&root=polypaudio&r1=479&r2=480&view=diff
==============================================================================
--- trunk/polyp/polyplib-introspect.c (original)
+++ trunk/polyp/polyplib-introspect.c Tue Feb 14 14:41:30 2006
@@ -582,7 +582,7 @@
/*** Volume manipulation ***/
-pa_operation* pa_context_set_sink_volume_by_index(pa_context *c, uint32_t idx, pa_volume_t volume, void (*cb)(pa_context *c, int success, void *userdata), void *userdata) {
+pa_operation* pa_context_set_sink_volume_by_index(pa_context *c, uint32_t idx, const pa_cvolume *volume, void (*cb)(pa_context *c, int success, void *userdata), void *userdata) {
pa_operation *o;
pa_tagstruct *t;
uint32_t tag;
@@ -597,14 +597,14 @@
pa_tagstruct_putu32(t, tag = c->ctag++);
pa_tagstruct_putu32(t, idx);
pa_tagstruct_puts(t, NULL);
- pa_tagstruct_putu32(t, volume);
+ pa_tagstruct_put_cvolume(t, volume);
pa_pstream_send_tagstruct(c->pstream, t);
pa_pdispatch_register_reply(c->pdispatch, tag, DEFAULT_TIMEOUT, pa_context_simple_ack_callback, o);
return pa_operation_ref(o);
}
-pa_operation* pa_context_set_sink_volume_by_name(pa_context *c, const char *name, pa_volume_t volume, void (*cb)(pa_context *c, int success, void *userdata), void *userdata) {
+pa_operation* pa_context_set_sink_volume_by_name(pa_context *c, const char *name, const pa_cvolume *volume, void (*cb)(pa_context *c, int success, void *userdata), void *userdata) {
pa_operation *o;
pa_tagstruct *t;
uint32_t tag;
@@ -619,14 +619,14 @@
pa_tagstruct_putu32(t, tag = c->ctag++);
pa_tagstruct_putu32(t, PA_INVALID_INDEX);
pa_tagstruct_puts(t, name);
- pa_tagstruct_putu32(t, volume);
+ pa_tagstruct_put_cvolume(t, volume);
pa_pstream_send_tagstruct(c->pstream, t);
pa_pdispatch_register_reply(c->pdispatch, tag, DEFAULT_TIMEOUT, pa_context_simple_ack_callback, o);
return pa_operation_ref(o);
}
-pa_operation* pa_context_set_sink_input_volume(pa_context *c, uint32_t idx, pa_volume_t volume, void (*cb)(pa_context *c, int success, void *userdata), void *userdata) {
+pa_operation* pa_context_set_sink_input_volume(pa_context *c, uint32_t idx, const pa_cvolume *volume, void (*cb)(pa_context *c, int success, void *userdata), void *userdata) {
pa_operation *o;
pa_tagstruct *t;
uint32_t tag;
@@ -640,7 +640,7 @@
pa_tagstruct_putu32(t, PA_COMMAND_SET_SINK_INPUT_VOLUME);
pa_tagstruct_putu32(t, tag = c->ctag++);
pa_tagstruct_putu32(t, idx);
- pa_tagstruct_putu32(t, volume);
+ pa_tagstruct_put_cvolume(t, volume);
pa_pstream_send_tagstruct(c->pstream, t);
pa_pdispatch_register_reply(c->pdispatch, tag, DEFAULT_TIMEOUT, pa_context_simple_ack_callback, o);
Modified: trunk/polyp/polyplib-introspect.h
URL: http://0pointer.de/cgi-bin/viewcvs.cgi/trunk/polyp/polyplib-introspect.h?rev=480&root=polypaudio&r1=479&r2=480&view=diff
==============================================================================
--- trunk/polyp/polyplib-introspect.h (original)
+++ trunk/polyp/polyplib-introspect.h Tue Feb 14 14:41:30 2006
@@ -183,13 +183,13 @@
pa_operation* pa_context_get_source_output_info_list(pa_context *c, void (*cb)(pa_context *c, const pa_source_output_info*i, int is_last, void *userdata), void *userdata);
/** Set the volume of a sink device specified by its index */
-pa_operation* pa_context_set_sink_volume_by_index(pa_context *c, uint32_t idx, pa_volume_t volume, void (*cb)(pa_context *c, int success, void *userdata), void *userdata);
+pa_operation* pa_context_set_sink_volume_by_index(pa_context *c, uint32_t idx, const pa_cvolume *volume, void (*cb)(pa_context *c, int success, void *userdata), void *userdata);
/** Set the volume of a sink device specified by its name */
-pa_operation* pa_context_set_sink_volume_by_name(pa_context *c, const char *name, pa_volume_t volume, void (*cb)(pa_context *c, int success, void *userdata), void *userdata);
+pa_operation* pa_context_set_sink_volume_by_name(pa_context *c, const char *name, const pa_cvolume *volume, void (*cb)(pa_context *c, int success, void *userdata), void *userdata);
/** Set the volume of a sink input stream */
-pa_operation* pa_context_set_sink_input_volume(pa_context *c, uint32_t idx, pa_volume_t volume, void (*cb)(pa_context *c, int success, void *userdata), void *userdata);
+pa_operation* pa_context_set_sink_input_volume(pa_context *c, uint32_t idx, const pa_cvolume *volume, void (*cb)(pa_context *c, int success, void *userdata), void *userdata);
/** Memory block statistics */
typedef struct pa_stat_info {
More information about the pulseaudio-commits
mailing list