mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-03-31 18:44:54 +00:00
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@15411 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
parent
5314971b8c
commit
f3ec5531ef
@ -1105,8 +1105,10 @@ static switch_status_t devlist(char **argv, int argc, switch_stream_handle_t *st
|
|||||||
{
|
{
|
||||||
int i, numDevices, prev;
|
int i, numDevices, prev;
|
||||||
const PaDeviceInfo *deviceInfo;
|
const PaDeviceInfo *deviceInfo;
|
||||||
|
const PaHostApiInfo *hostApiInfo;
|
||||||
|
|
||||||
numDevices = Pa_GetDeviceCount();
|
numDevices = Pa_GetDeviceCount();
|
||||||
|
|
||||||
if (numDevices < 0) {
|
if (numDevices < 0) {
|
||||||
return SWITCH_STATUS_SUCCESS;
|
return SWITCH_STATUS_SUCCESS;
|
||||||
}
|
}
|
||||||
@ -1116,7 +1118,8 @@ static switch_status_t devlist(char **argv, int argc, switch_stream_handle_t *st
|
|||||||
|
|
||||||
for (i = 0; i < numDevices; i++) {
|
for (i = 0; i < numDevices; i++) {
|
||||||
deviceInfo = Pa_GetDeviceInfo(i);
|
deviceInfo = Pa_GetDeviceInfo(i);
|
||||||
stream->write_function(stream, "\t\t<device id=\"%d\" name=\"%s\" inputs=\"%d\" outputs=\"%d\" />\n", i, deviceInfo->name, deviceInfo->maxInputChannels, deviceInfo->maxOutputChannels);
|
hostApiInfo = Pa_GetHostApiInfo(deviceInfo->hostApi);
|
||||||
|
stream->write_function(stream, "\t\t<device id=\"%d\" name=\"%s\" hostapi=\"%s\" inputs=\"%d\" outputs=\"%d\" />\n", i, deviceInfo->name, hostApiInfo->name, deviceInfo->maxInputChannels, deviceInfo->maxOutputChannels);
|
||||||
}
|
}
|
||||||
|
|
||||||
stream->write_function(stream, "\t</devices>\n\t<bindings>\n"
|
stream->write_function(stream, "\t</devices>\n\t<bindings>\n"
|
||||||
@ -1128,7 +1131,9 @@ static switch_status_t devlist(char **argv, int argc, switch_stream_handle_t *st
|
|||||||
|
|
||||||
for (i = 0; i < numDevices; i++) {
|
for (i = 0; i < numDevices; i++) {
|
||||||
deviceInfo = Pa_GetDeviceInfo(i);
|
deviceInfo = Pa_GetDeviceInfo(i);
|
||||||
stream->write_function(stream, "%d;%s;%d;%d;", i, deviceInfo->name, deviceInfo->maxInputChannels, deviceInfo->maxOutputChannels);
|
hostApiInfo = Pa_GetHostApiInfo(deviceInfo->hostApi);
|
||||||
|
|
||||||
|
stream->write_function(stream, "%d;%s(%s);%d;%d;", i, deviceInfo->name, hostApiInfo->name, deviceInfo->maxInputChannels, deviceInfo->maxOutputChannels);
|
||||||
|
|
||||||
prev = 0;
|
prev = 0;
|
||||||
if (globals.ringdev == i) {
|
if (globals.ringdev == i) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user