CJ van den Berg wrote: > On Mon, Aug 14, 2006 at 10:29:40AM +0200, Pierre Ossman wrote: >> Adam Scarr wrote: >>> Firstly a question, is it possible to combine cards under windows, if >>> so how? It dosent seem that waveout module supports any kind of device >>> selection. >> True. This isn't supported right now. Unfortunately I do not have a >> machine with two cards so that I can properly test it. If you're willing >> to be a guinea pig, I might be able to fix something. > > I have a windows box with two sound cards and I would happily help testing > under windows. >
Sorry this took a while, but here's the patch. Do some tests of both playback and recording and see if everything works. -- Pierre Ossman OpenSource-based Thin Client Technology System Developer Telephone: +46-13-21 46 00 Cendio AB Web: http://www.cendio.com
Index: src/modules/module-waveout.c
===================================================================
--- src/modules/module-waveout.c (revision 1328)
+++ src/modules/module-waveout.c (working copy)
@@ -47,7 +47,8 @@
PA_MODULE_VERSION(PACKAGE_VERSION)
PA_MODULE_USAGE(
"sink_name=<name for the sink> "
- "source_name=<name for the source>"
+ "source_name=<name for the source> "
+ "device=<device number> "
"record=<enable source?> "
"playback=<enable sink?> "
"format=<sample format> "
@@ -90,6 +91,7 @@
static const char* const valid_modargs[] = {
"sink_name",
"source_name",
+ "device",
"record",
"playback",
"fragments",
@@ -432,6 +434,7 @@
WAVEFORMATEX wf;
int nfrags, frag_size;
int record = 1, playback = 1;
+ unsigned int device;
pa_sample_spec ss;
pa_channel_map map;
pa_modargs *ma = NULL;
@@ -455,6 +458,12 @@
goto fail;
}
+ device = WAVE_MAPPER;
+ if (pa_modargs_get_value_u32(ma, "device", &device) < 0) {
+ pa_log("failed to parse device argument");
+ goto fail;
+ }
+
nfrags = 5;
frag_size = 8192;
if (pa_modargs_get_value_s32(ma, "fragments", &nfrags) < 0 || pa_modargs_get_value_s32(ma, "fragment_size", &frag_size) < 0) {
@@ -474,7 +483,7 @@
u = pa_xmalloc(sizeof(struct userdata));
if (record) {
- if (waveInOpen(&hwi, WAVE_MAPPER, &wf, (DWORD_PTR)chunk_ready_cb, (DWORD_PTR)u, CALLBACK_FUNCTION) != MMSYSERR_NOERROR) {
+ if (waveInOpen(&hwi, device, &wf, (DWORD_PTR)chunk_ready_cb, (DWORD_PTR)u, CALLBACK_FUNCTION) != MMSYSERR_NOERROR) {
pa_log("failed to open waveIn");
goto fail;
}
@@ -486,7 +495,7 @@
}
if (playback) {
- if (waveOutOpen(&hwo, WAVE_MAPPER, &wf, (DWORD_PTR)chunk_done_cb, (DWORD_PTR)u, CALLBACK_FUNCTION) != MMSYSERR_NOERROR) {
+ if (waveOutOpen(&hwo, device, &wf, (DWORD_PTR)chunk_done_cb, (DWORD_PTR)u, CALLBACK_FUNCTION) != MMSYSERR_NOERROR) {
pa_log("failed to open waveOut");
goto fail;
}
signature.asc
Description: OpenPGP digital signature
_______________________________________________ pulseaudio-discuss mailing list [email protected] https://tango.0pointer.de/mailman/listinfo/pulseaudio-discuss
