Click here to Skip to main content
15,887,683 members
Please Sign up or sign in to vote.
5.00/5 (1 vote)
See more:
I have a 3G USB Modem provided by BSNL India and it is manufactured by Teracom.

I'm good at C/C++ and know little Visual C++.

The software that comes with this is really bad. As soon as it installs, it sets the default audio playback/recording device to "HSPADataCard". Voice calls work only if this is set as default device. If I change it to "Realtek AC97 Audio", other applications work fine but voice calls through this USB device fail :(
The callee's phone rings but neither the caller nor the callee person hears anything!

I guess it looks for the device name "HSPADataCard" because it pops a MessageBox saying "Internal errors", if the default audio device is changed.

I tried opening the .exe file with Ollydbg and searched for the string "HSPADataCard". There was only one instruction that referred to the string. I found a place where I can accomodate 19 bytes (all of them were 0s). I replaced it with the string "Realteck AC97 Audio" and made that instruction refer to this new string. These kind of tricks use to work, but unfortunately it didn't work this time. The application just crashes.

I know we can set the default audio device to HSPADataCard before starting the application, then start the application, finally change the default audio device to Realtek. But it is too tedious process and I can't keep changing it time and agian.

So, how exactly does an application find the default audio device? Is it possible for us to make the application see a specific audio device as the system default? Is such kind of spoofing possible?

Any better solution? I want to listen to music and attend calls?
Posted
Updated 23-Apr-11 7:58am
v2

1 solution

I would not know how exactly to show one sound device as being default to one application and another to a completely seperate application but have you considered taking your manual steps of changing the default device into a program. What I mean is, write a program that sets the default device to 'HSPADataCard', starts the software and then switches the device back to Realtek and then shutdown. Then, instead of opening the modem software directly, run your program to open it, thus removing the hard work for you. :)
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900