This site is no longer active and is available for archival purposes only. Registration and login is disabled.

Sound (Tone) Generation: beep (freq, duration)


Sound (Tone) Generation: beep (freq, duration)

Postby Guest » Jun 30, 2002 @ 11:42pm

How would you go about doing the following?

I'd like to generate tones for specific durations (dynamically) on the pocketPC. I've checked into several sound libs and can't find any that give me the ability to do the following:

beep (frequency, duration in ms)

A simple use of this function might be to create a morse code utility. It could be used for more complex apps that handle full protocols, etc.

Ideally, this function would work like several you've seen in PC APIs (interruptable, multiple "beeps" running concurrently, ...).

Any ideas?

Is it possible?

Thanks -
dxmonger@yahoo.com
Guest
 


Postby britcode » Jul 1, 2002 @ 2:06am

britcode
 


Postby Guest » Jul 1, 2002 @ 7:11pm

Thanks for the reply, Britcode.

I think you have the general idea as to what I'd like to do... simply generate one or two sines (or other waveforms) in a controlled (strict time slice) manner. Again, ideally, I'd love to have a function that did something like:

beep (frequency, duration)

but I can't find it.

Someone pointed out that the application, Pocket Oscillator <http://www.pocketgear.com/software_detail.asp?id=3861> does allow you to create (and mix) multiple sine waves (so it's certainly possible). You pointed out that pocketpcdn.com offers tutorials on sampled sound. I can find plenty of examples to play a wav file (via PlaySound() and other calls or GAPI), but nothing that gives me the ability to do this on my own.

I guess I'm still struggling a bit with getting this off the ground. First thing's first:

What language would you do this in?

Are there any libraries that would allow me to do this easier? I've looked at fmod, but that is more geared towards playing a wav than generating a tone.

I'm kinda thinking that I'd be forced to write an assembly routine to call the sound/speaker system (ug).

Additional help is appreciated!
Guest
 


Postby britcode » Jul 1, 2002 @ 8:44pm

>I'm kinda thinking that I'd be forced to write an assembly routine to call the sound/speaker system (ug).

Nono - just use the waveOpenOut functions, no need for assembler. Check out msdn.microsoft.com or the example on pocketpcdn if there is one.
Sadly there is no beep function.
I recommend you program in C/C++.
britcode
 


Return to Windows Mobile


Sort


Forum Description

A discussion forum for mobile device developers on the Windows Mobile platform. Any platform specific topics are welcome.

Moderators:

Dan East, sponge, Digby, David Horn, Kevin Gelso, RICoder

Forum permissions

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

cron