![]() ![]() ![]() Note that Audiere is LGPL-licensed, and the binding has no license attached to it. You might have to play around with the ramp speed to get it to sound "just right". The easiest workaround I've found for that is to slowly ramp the tone's volume up or down when you're turning the tone on or off, respectively. One possible downside is that there is a slightly audible "click" as you start or stop an individual tone it's not noticeable if you add one tone to an already playing tone. By the way, Audiere can also play certain audio files (MP3, WAV, AIFF, MOD, S3M, XM, IT by itself Ogg Vorbis, Flac, Speex with external libraries), not just pure generated tones. I am not aware of any hard upper limits on how many simultaneous output streams you can use, so it's probably whatever your hardware/OS supports. You don't have to wait for tone1a to stop playing before you start tone1b, which is clearly a necessity for playing complex tones. One of the nice benefits of using Audiere is that the calls are non-blocking. You'll need to download the Win32 Audiere DLL, lib, and header (which are all in the same zip) and you'll need to build the C# binding from source using both VC++ and C#. To use Audiere in C#, the easiest way to get up and running is to use Harald Fielker's C# binding (which he claims works on Mono and VS I can confirm it works in the both full version of VS2005 and using the separate Express 2008 versions of C# and VC++). when tone1a stops, you can easily tell that the tone was indeed DTMF OutputStream tone1b = device.CreateTone(1209) // part B OutputStream tone1a = device.CreateTone(697) // part A of DTMF for "1" button Here's a nearly complete C# program to generate the DTMF tone for the "1" button: AudioDevice device = new AudioDevice() The Audiere library makes this extremely easy to do.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |