* add new parameter to pa_open_config_file() to specify open mode

* modify pa_sink_input_new() to take initial volume settings as argument
* call pa_sink_input_set_volume() when changing stream volume in protocol-esound.c to make sure that subscribe events are issued properly


git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@858 fefdeb5f-60dc-0310-8127-8f9354f1896f
This commit is contained in:
Lennart Poettering 2006-05-14 00:41:18 +00:00
parent e46f8f8eb3
commit be05b18c6f
15 changed files with 43 additions and 34 deletions

View file

@ -238,7 +238,7 @@ static struct output *output_new(struct userdata *u, pa_sink *sink, int resample
sink->core->memblock_stat);
snprintf(t, sizeof(t), "%s: output #%u", u->sink->name, u->n_outputs+1);
if (!(o->sink_input = pa_sink_input_new(sink, __FILE__, t, &u->sink->sample_spec, &u->sink->channel_map, 1, resample_method)))
if (!(o->sink_input = pa_sink_input_new(sink, __FILE__, t, &u->sink->sample_spec, &u->sink->channel_map, NULL, 1, resample_method)))
goto fail;
o->sink_input->get_latency = sink_input_get_latency_cb;

View file

@ -43,7 +43,7 @@
#include "module-match-symdef.h"
PA_MODULE_AUTHOR("Lennart Poettering")
PA_MODULE_DESCRIPTION("Sink input matching module")
PA_MODULE_DESCRIPTION("Playback stream expression matching module")
PA_MODULE_USAGE("table=<filename>")
PA_MODULE_VERSION(PACKAGE_VERSION)
@ -81,7 +81,7 @@ static int load_rules(struct userdata *u, const char *filename) {
f = filename ?
fopen(fn = pa_xstrdup(filename), "r") :
pa_open_config_file(DEFAULT_MATCH_TABLE_FILE, DEFAULT_MATCH_TABLE_FILE_USER, NULL, &fn);
pa_open_config_file(DEFAULT_MATCH_TABLE_FILE, DEFAULT_MATCH_TABLE_FILE_USER, NULL, &fn, "r");
if (!f) {
pa_log(__FILE__": failed to open file '%s': %s", fn, strerror(errno));

View file

@ -141,7 +141,7 @@ int pa__init(pa_core *c, pa_module*m) {
calc_sine(u->memblock->data, u->memblock->length, frequency);
snprintf(t, sizeof(t), "Sine Generator at %u Hz", frequency);
if (!(u->sink_input = pa_sink_input_new(sink, __FILE__, t, &ss, NULL, 0, -1)))
if (!(u->sink_input = pa_sink_input_new(sink, __FILE__, t, &ss, NULL, NULL, 0, -1)))
goto fail;
u->sink_input->peek = sink_input_peek;

View file

@ -286,7 +286,7 @@ static struct session *session_new(struct userdata *u, const pa_sdp_info *sdp_in
sdp_info->session_name ? sdp_info->session_name : "",
sdp_info->session_name ? ")" : "");
s->sink_input = pa_sink_input_new(sink, __FILE__, c, &sdp_info->sample_spec, NULL, 0, PA_RESAMPLER_INVALID);
s->sink_input = pa_sink_input_new(sink, __FILE__, c, &sdp_info->sample_spec, NULL, NULL, 0, PA_RESAMPLER_INVALID);
pa_xfree(c);
if (!s->sink_input) {