[Freeswitch-svn] [commit] r11236 - freeswitch/trunk/src/mod/endpoints/mod_portaudio
FreeSWITCH SVN
andrew at freeswitch.org
Thu Jan 15 14:58:59 PST 2009
Author: andrew
Date: Thu Jan 15 16:58:59 2009
New Revision: 11236
Log:
Commit patch from MODENDP-174
Modified:
freeswitch/trunk/src/mod/endpoints/mod_portaudio/mod_portaudio.c
Modified: freeswitch/trunk/src/mod/endpoints/mod_portaudio/mod_portaudio.c
==============================================================================
--- freeswitch/trunk/src/mod/endpoints/mod_portaudio/mod_portaudio.c (original)
+++ freeswitch/trunk/src/mod/endpoints/mod_portaudio/mod_portaudio.c Thu Jan 15 16:58:59 2009
@@ -1030,7 +1030,7 @@
static switch_status_t devlist(char **argv, int argc, switch_stream_handle_t *stream)
{
- int i, numDevices;
+ int i, numDevices, prev;
const PaDeviceInfo *deviceInfo;
numDevices = Pa_GetDeviceCount();
@@ -1039,7 +1039,32 @@
}
for (i = 0; i < numDevices; i++) {
deviceInfo = Pa_GetDeviceInfo(i);
- stream->write_function(stream, "%d;%s;%d;%d\n", i, deviceInfo->name, deviceInfo->maxInputChannels, deviceInfo->maxOutputChannels);
+ stream->write_function(stream, "%d;%s;%d;%d;", i, deviceInfo->name, deviceInfo->maxInputChannels, deviceInfo->maxOutputChannels);
+
+ prev = 0;
+ if (globals.ringdev == i) {
+ stream->write_function(stream, "r");
+ prev = 1;
+ }
+
+ if (globals.indev == i) {
+ if (prev) {
+ stream->write_function(stream, ",");
+ }
+ stream->write_function(stream, "i");
+ prev = 1;
+ }
+
+ if (globals.outdev == i) {
+ if (prev) {
+ stream->write_function(stream, ",");
+ }
+ stream->write_function(stream, "o");
+ prev = 1;
+ }
+
+ stream->write_function(stream, "\n");
+
}
return SWITCH_STATUS_SUCCESS;
More information about the Freeswitch-svn
mailing list