> The function Beep does not exist for the .NET Compact Framework. Does
> anyone know of any other function which does the same work? Or has any
> one developed one.
The simplest way is to P/Invoke PlaySound and play the system beep
> And also I want a beep function with a .1 ms
> precision.
Since the system tick is 1ms, getting 0.1ms precision is going to be tough
with just software.
> Is that possible at the level we are working at or i will
> need to do assembly level programming?
It's certainly not possible with the CF. You can't get deterministic
behavior from managed code.
> I know of a playsound function that plays WAV files but I do not want
> to play a WAV file.
Then P/Invoking Playsound as I suggested earlier isn't going to work
> I have a stream of bits and want to decide on the
> fly what type of sound I need to play. For bit 1, I want a sound of
> 1000 Hz frequency for a 0.1 ms duration. And for bit 0, I want a sound
> of 2000Hz frequency for 0.1 ms.
Playing a tone of a certain frequency will require directly writing data to
a buffer and sending it to the audio driver. Since you know your
frequencies, it's very easy to determine how many data points would lie in a
certain period of time, so you can generate a tone of a specific frequency
for an exact length pretty easily.
That said, I don't really understand what you're trying to do. First,
you'll not be able to "hear" a tine that short. Second, a 1000Hz signal for
0.1ms duration is less than a single wave (1000 waves per second / 10000 =
0.1) so you really can't get a tone from it anyway. What are you trying to
achieve here?
--
Chris Tacke
Co-founder
OpenNETCF.org
Has OpenNETCF helped you? Consider donating to support us!
http://www.opennetcf.org/donate