2 Attachment(s)
Re: VB - Tone Recognition
Since most people want to see this working fast, I made a C++ DLL where I converted the main function that does all the heavy work.
I attached the new ToneRecognition.zip file, you have to put the SoundStuff.DLL in your SYSTEM32 folder, DON'T FORGET, otherwise you will get an error, and you probably will have to end task if you don't.
I also attached the SoundStuff.zip, the C++ project, has only 2 functions, and VB is using only one of them...
I tested for speed now, and it shows that it processes the buffer in 16 ms (a little more than what I have tested in the past), but still fast enough to process everything in real time, and without your CPU going 100% (like in VB)
The time it takes to process is directly proportional to the sound frequency, for example if you listen music (obviously it won't recognize any tone from that), the time to process increases to ~ 50 ms (therefore your CPU usage also), that is because the music sounds are higher frequencies than the tones from the phone.
Also, since this project does it fast (real time), you can try to test it with the microphone also, but you have to change the "acceptable" percentage from:
If HighPercent > (AvgPercent + 0.05) Then ' 5%
to
If HighPercent > (AvgPercent + 0.01) Then ' 1%
This line you will find at the end of AnalyzeBuffer function.
I don't have a microphone around me right now to test if the 1% does the trick for when using the microphone, but I think that's how it was in the past when I was testing...
Anyways... have fun with it...
Re: VB - Tone Recognition
Wrong thread for that particular post and a pretty big bump.