Help - Search - Members - Calendar
Full Version: sound comparing in AC TOOL
AC Tools Everything Macro > AC Tool Macros > Macro Development
doboszsite
Hi,
I'm new at forum.
I just started writing my own macros in AC TOOL and i have question. Can i compare sounds from game? I would like to do event which will be run if game play selected sound. I hope I did explained it enough.
Is it possibile? If it is - how?
DaMOB
QUOTE(doboszsite @ May 18 2009, 11:01 AM) *
Hi,
I'm new at forum.
I just started writing my own macros in AC TOOL and i have question. Can i compare sounds from game? I would like to do event which will be run if game play selected sound. I hope I did explained it enough.
Is it possibile? If it is - how?

Not in ACTool but you can "hook" the sound device and look for a stream of bytes that match what you are looking for. In effect you are comparing the sound to what you are looking for.

As far as hooking goes good luck because I am learning that now and it is a motherfucker.
Vengor
ooooooo a good use for ACTools and opens a big can of worms. How would you be able to handle it? You would have to get the sample prior to processing if the game applies any effects to the sound for positioning and environment. It would be different for every game I would imagine unless it is a direct x game and it would have to rely on direct x for all the processing... or would it? Damn there are lots of questions that come up and so many ways that games could handle it and what gets passed on to get processed by direct x. Or I might be completely clueless on this issue as I have no idea how I would begin.
DaMOB
QUOTE(Vengor @ May 27 2009, 03:53 PM) *
ooooooo a good use for ACTools and opens a big can of worms. How would you be able to handle it? You would have to get the sample prior to processing if the game applies any effects to the sound for positioning and environment. It would be different for every game I would imagine unless it is a direct x game and it would have to rely on direct x for all the processing... or would it? Damn there are lots of questions that come up and so many ways that games could handle it and what gets passed on to get processed by direct x. Or I might be completely clueless on this issue as I have no idea how I would begin.

Well, per game really since Microsoft killed directsound at the hardware level (EAX). I know in directsound you are told which packet of sound you are on and here is the payload (look at the directsound plugin for winamp that has been around for 4 or 5 years). You can watch the packet information in real time or in various time intervals. If you hooked the directsound, or miles, or openal, you can gather the bytes up. Wait until the packet stream is the number you are wanting to compare then do your compare on the actual stream. Very easy once you have hooked it.

Now the above is for a song but for a game it will get more complicated unless the sound effect is only used in one place in the game.
Vengor
It would figure that MS has to take something that works well and make it a terrible mess. But now this post has got me to thinking about how to use sound aarrrrrggggg too many other things to figure out first.
doboszsite
I believe that DaMOB is right. It should be possible to get the bits out of sound. And it’s no need to do any directsound hook - I can get it just at output. Please tell me if I am wrong.
DaMOB
QUOTE(doboszsite @ May 30 2009, 06:41 AM) *
I believe that DaMOB is right. It should be possible to get the bits out of sound. And it’s no need to do any directsound hook - I can get it just at output. Please tell me if I am wrong.

Depends because some cards can't see what is being sent out.

Take for instance the old way of recording what you hear (I forgot the sound driver option for this). Doing it like that was never accurate and a bit for bit comparison from the original was always different.

So, trying to do something like that would have errors involved. Errors are fine if they are always the same errors but if the errors changed (and they did) you can't do it like that.

Really, the best way is to hook the sound driver before it has a chance to play the sound.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2010 Invision Power Services, Inc.