mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-04 13:29:59 -05:00
Channel map argument support for solaris.
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@815 fefdeb5f-60dc-0310-8127-8f9354f1896f
This commit is contained in:
parent
0b95438f10
commit
99612dd88d
1 changed files with 15 additions and 4 deletions
|
|
@ -57,7 +57,16 @@
|
|||
PA_MODULE_AUTHOR("Pierre Ossman")
|
||||
PA_MODULE_DESCRIPTION("Solaris Sink/Source")
|
||||
PA_MODULE_VERSION(PACKAGE_VERSION)
|
||||
PA_MODULE_USAGE("sink_name=<name for the sink> source_name=<name for the source> device=<OSS device> record=<enable source?> playback=<enable sink?> format=<sample format> channels=<number of channels> rate=<sample rate> buffer_size=<record buffer size>")
|
||||
PA_MODULE_USAGE(
|
||||
"sink_name=<name for the sink> "
|
||||
"source_name=<name for the source> "
|
||||
"device=<OSS device> record=<enable source?> "
|
||||
"playback=<enable sink?> "
|
||||
"format=<sample format> "
|
||||
"channels=<number of channels> "
|
||||
"rate=<sample rate> "
|
||||
"buffer_size=<record buffer size> "
|
||||
"channel_map=<channel map>")
|
||||
|
||||
struct userdata {
|
||||
pa_sink *sink;
|
||||
|
|
@ -88,6 +97,7 @@ static const char* const valid_modargs[] = {
|
|||
"format",
|
||||
"rate",
|
||||
"channels",
|
||||
"channel_map",
|
||||
NULL
|
||||
};
|
||||
|
||||
|
|
@ -486,6 +496,7 @@ int pa__init(pa_core *c, pa_module*m) {
|
|||
int mode;
|
||||
int record = 1, playback = 1;
|
||||
pa_sample_spec ss;
|
||||
pa_channel_map map;
|
||||
pa_modargs *ma = NULL;
|
||||
struct timeval tv;
|
||||
assert(c && m);
|
||||
|
|
@ -514,7 +525,7 @@ int pa__init(pa_core *c, pa_module*m) {
|
|||
}
|
||||
|
||||
ss = c->default_sample_spec;
|
||||
if (pa_modargs_get_sample_spec(ma, &ss) < 0) {
|
||||
if (pa_modargs_get_sample_spec_and_channel_map(ma, &ss, &map) < 0) {
|
||||
pa_log(__FILE__": failed to parse sample specification");
|
||||
goto fail;
|
||||
}
|
||||
|
|
@ -535,7 +546,7 @@ int pa__init(pa_core *c, pa_module*m) {
|
|||
u->core = c;
|
||||
|
||||
if (mode != O_WRONLY) {
|
||||
u->source = pa_source_new(c, __FILE__, pa_modargs_get_value(ma, "source_name", DEFAULT_SOURCE_NAME), 0, &ss, NULL);
|
||||
u->source = pa_source_new(c, __FILE__, pa_modargs_get_value(ma, "source_name", DEFAULT_SOURCE_NAME), 0, &ss, &map);
|
||||
assert(u->source);
|
||||
u->source->userdata = u;
|
||||
u->source->get_latency = source_get_latency_cb;
|
||||
|
|
@ -547,7 +558,7 @@ int pa__init(pa_core *c, pa_module*m) {
|
|||
u->source = NULL;
|
||||
|
||||
if (mode != O_RDONLY) {
|
||||
u->sink = pa_sink_new(c, __FILE__, pa_modargs_get_value(ma, "sink_name", DEFAULT_SINK_NAME), 0, &ss, NULL);
|
||||
u->sink = pa_sink_new(c, __FILE__, pa_modargs_get_value(ma, "sink_name", DEFAULT_SINK_NAME), 0, &ss, &map);
|
||||
assert(u->sink);
|
||||
u->sink->get_latency = sink_get_latency_cb;
|
||||
u->sink->get_hw_volume = sink_get_hw_volume_cb;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue