Author |
|
mfitzgerald Vetran
Joined: June 14 2006 Location: United States Posts: 142
|
Posted: January 12 2009 at 5:35pm | IP Logged
|
|
|
I believe I've come across an issue that is residual to a situation we mentioned a VERY long time ago. If you recall LS used to use the same function call to get a device ID number (a zero delimited representation of audio devices on the system) for both Input and Output devices.
We made mention that sometimes M$ (MircoSoft) would not always keep input and output devices in the same order:
Example:
Code:
#0 - "OnBoard Sound Mic 5"
#1 - "PLX Mic 6"
#2 - "XI Mic 7"
---------------
#0 - "XI Speaker 7"
#1 - "OnBoard Sound Speaker 5"
#2 - "PLX Speaker 6"
|
|
|
NOTE: The number following # represents the ID/value that would be passed to GetDigitalAudioInputDevice(#,&devName), the number after the "name" of the sound device is only for identifying common audio hardware.
This caused some issues when trying to route audio to the proper device. LS issued a fix to separate the input and output identifier functions. However I believe there is some legacy validation code within the engine which is causing a problem if the Input and Output device counts do not match.
What I'm seeing, is if there is a difference in the number of input and output devices (in this case, there are more input devices than output devices). When attempting to poll through all the devices we cannot validate or grab all the device names beyond the count of the output devices.
Observation appears to indicate the Input audio device count works correctly:
Code:
GetNumDigitalAudioInputDevices(); // returns 4 for the Example below
GetNumDigitalAudioOutputDevices(); // returns 3 for the Example below
|
|
|
However if the number of input devices is greater than the number of output devices, you cannot get the name for the input devices once you've gone past the output device count.
Example:
Code:
#0 - "OnBoard Sound Mic 5"
#1 - "PLX Mic 6"
#2 - "CM Mic 32"
#3 - "XI Mic 7"
---------------
#0 - "XI Speaker 7"
#1 - "OnBoard Sound Speaker 5"
#2 - "PLX Speaker 6"
|
|
|
Code:
GetDigitalAudioInputDevice(i, &devName); // appears to return 0 if "i" is greater than the output device count
GetDigitalAudioOutputDevice(i, &devName);
|
|
|
Our code is designed to look for specific devices via partial name recognition. So if the matching device is "XI", then when we try to grab the output device it works just fine, however when we try to get the name for the last (4th) device in the Input function GetDigitalAudioInputDevice(#,&devName) it retuns a zero and thus no device name to match.
Example/psuedo Code used to dump a list of all input devices
NOTE: similar code was written for the output devices (left off for brevity)
Code:
//get the number of Audio Devices
int MxInDevs = GetNumDigitalAudioInputDevices();
for(i = 0; CurCnt < MxInDevs; ++i)
{
if(GetDigitalAudioInputDevice(i,&devName))
Log("Audio in Device #%i/%i \"%s\"", i, MxInDevs, devName);
// Note: device name matching code would go here
else
Log("Audio in Dev #%i/%i could not be validated", i, MxInDevs);
}
|
|
|
The output would result in:
Code:
INPUT DEVS
Audio in Device #0/4 "OnBoard Sound Mic 5"
Audio in Device #1/4 "PLX Mic 6"
Audio in Device #2/4 "CM Mic 32"
Audio in Device #3/4 could not be validated
OUTPUT DEVS
Audio out Device #0/3 "XI Speaker 7"
Audio out Device #1/3 "OnBoard Sound Speaker 5"
Audio out Device #2/3 "PLX Speaker 6"
|
|
|
When we attempt to have LS use the XI device's Output and Mic we could only get the Output to work, the Mic is not found or could not be validated.
I could be wrong in my presumption of the source of the problem; however the results are there none the less.
I'm very curious to know if my presumption is accurate.
Thanks for your quick response.
|
Back to Top |
|
|
support Administrator
Joined: January 26 2005 Location: United States Posts: 1666
|
Posted: January 13 2009 at 10:24am | IP Logged
|
|
|
Hi Fitz,
We will look into this right away. Hang on....
Randal
|
Back to Top |
|
|
mfitzgerald Vetran
Joined: June 14 2006 Location: United States Posts: 142
|
Posted: January 13 2009 at 10:27am | IP Logged
|
|
|
FYI... the "CurCnt" in the pseudo code example should be "i".
Code:
for(i = 0; CurCnt < MxInDevs; ++i)
// should have been
for(int i = 0; i < MxInDevs; ++i)
|
|
|
|
Back to Top |
|
|
support Administrator
Joined: January 26 2005 Location: United States Posts: 1666
|
Posted: January 13 2009 at 11:59am | IP Logged
|
|
|
Hi Fitz,
Great job posting the information. Very descriptive and succinct. When individuals post information this accurate, it allows us to get right to the cause of the issue quickly. Thanks.
OK, here is the cause of the error: When the media engine logic was split to handle separate audio device inputs and outputs (sometime on or before September of 2005), a “cut and paste” bug was not discovered until you just reported this issue. So this is a different issue but related to the split audio device functionality you previously mentioned.
This is what is occurring: The GetDigitalAudioInputDevice() API procedure is not using the count of input devices to validate the max value of the audio input index passed in the device index parameter. It is erroneously using the count of output devices. This is the error.
In systems where inputs and outputs are the same count, no problem. In systems where the in and out device counts are different and the output device count is less than the input device count, the VOIP app will never be able to properly get the info for the “last” audio in devices.
The QA tests we have for verifying this API procedure is used on host machines having the same number of audio output devices and audio input devices. That’s why it has not been seen thus far.
If you want to quickly test the fix, download the v6.0.0.7 “engineering release” from your support FTP account.
When you are ready, let me know when we can get you the official product image.
Randal
|
Back to Top |
|
|
mfitzgerald Vetran
Joined: June 14 2006 Location: United States Posts: 142
|
Posted: January 13 2009 at 3:12pm | IP Logged
|
|
|
Copy Past errors can get annoying, especially when they're not caught till latter.
Thanks for the update.
Before we integrate the update into our app, we need to know if 6.0.0.7 has an expiration date?
We finished integrating LS 6.0.0.6 and don't wish to deal with expiring software again.
|
Back to Top |
|
|
support Administrator
Joined: January 26 2005 Location: United States Posts: 1666
|
Posted: January 13 2009 at 3:32pm | IP Logged
|
|
|
Fitz,
Annoying is right…
Yes, the v6.0.0.7 engineering release in your support FTP account is time bombed (has an expiration date of 6-30-09). If this image passes your testing, let me know when you want a new product image and we will get that ready for you right away.
Randal
|
Back to Top |
|
|
mfitzgerald Vetran
Joined: June 14 2006 Location: United States Posts: 142
|
Posted: January 13 2009 at 4:40pm | IP Logged
|
|
|
We'll have an opportunity to test this after our current deployment proves successful.
Thanks
|
Back to Top |
|
|
mfitzgerald Vetran
Joined: June 14 2006 Location: United States Posts: 142
|
Posted: January 14 2009 at 3:47pm | IP Logged
|
|
|
Tests confirm 6.0.0.7 does not have the issue with Audio-In-Device validation in the case where In and Out Audio device counts do not match.
i.e. Tested with one more In device than Out device. Last device was desired device. Validation allowed us to grab the last device id and use it successfully.
We would be interested in the non-time bombed LS product image for integration with our app.
Thanks,
|
Back to Top |
|
|
support Administrator
Joined: January 26 2005 Location: United States Posts: 1666
|
Posted: January 14 2009 at 4:16pm | IP Logged
|
|
|
Hi Fitz,
Good... thanks for the feedback.
We will get a new official product image ready for you to download by tomorrow.
Randal
|
Back to Top |
|
|
support Administrator
Joined: January 26 2005 Location: United States Posts: 1666
|
Posted: January 15 2009 at 10:47am | IP Logged
|
|
|
Hi Fitz,
The v6.0.0.7 product image is ready in your support FTP account. Its the real thing – not time bombed. You know the drill. :)
Once again, great job on your bug desctiption.
Thanks,
Randal
|
Back to Top |
|
|
mfitzgerald Vetran
Joined: June 14 2006 Location: United States Posts: 142
|
Posted: January 15 2009 at 4:28pm | IP Logged
|
|
|
Awesome.
And thank you
|
Back to Top |
|
|