强制应用程序使用特定的音频设备? [英] Force an application to use a particular audio device?

查看:103
本文介绍了强制应用程序使用特定的音频设备?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个由BSNL印度提供的3G USB调制解调器,它是由Teracom制造的.

我擅长C/C ++,对Visual C ++的了解很少.

附带的软件真的很糟糕.安装后,它将默认音频播放/录制设备设置为"HSPADataCard".仅当将语音电话设置为默认设备时,语音电话才能工作.如果我将其更改为"Realtek AC97 Audio",则其他应用程序可以正常工作,但通过此USB设备的语音呼叫失败:(
被呼叫者的电话响了,但呼叫者或被呼叫者都没有听到任何声音!

我猜它会查找设备名称"HSPADataCard",因为如果更改了默认音频设备,则会弹出一个消息框,提示内部错误".

我尝试用Ollydbg打开.exe文件,并搜索了字符串"HSPADataCard".只有一个指令引用了该字符串.我找到了一个可以容纳19个字节的地方(所有地方都是0).我将其替换为字符串"Realteck AC97 Audio",并使该指令引用此新字符串.这些技巧常能奏效,但不幸的是,这次却没有奏效.该应用程序崩溃了.

我知道我们可以在启动应用程序之前将默认音频设备设置为HSPADataCard,然后启动应用程序,最后将默认音频设备更改为Realtek.但这是一个非常乏味的过程,我无法继续更改它的时间和敏捷性.

那么,应用程序如何准确找到默认音频设备?我们能否使应用程序将特定的音频设备视为系统默认值?这种欺骗是否可能?

有更好的解决方案吗?我想听音乐并参加电话吗?

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?

推荐答案

我不知道如何准确地将一个声音设备默认显示为一个应用程序,而将另一个默认显示为完全独立应用程序,但您是否考虑过将默认设备更改为程序的手动步骤.我的意思是,编写一个程序将默认设备设置为"HSPADataCard",启动软件,然后将设备切换回Realtek,然后关闭.然后,而不是直接打开调制解调器软件,而是运行程序以将其打开,从而免除了您的辛苦工作. :)
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. :)


这篇关于强制应用程序使用特定的音频设备?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆