PC Review


Reply
Thread Tools Rate Thread

BEEP function not present in .NET CF....

 
 
amitkhemlani@gmail.com
Guest
Posts: n/a
 
      11th Mar 2005
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. And also I want a beep function with a .1 ms
precision. Is that possible at the level we are working at or i will
need to do assembly level programming?

I know of a playsound function that plays WAV files but I do not want
to play a WAV file. 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.

Hope to hearing from you soon.

Thanks,
Amit

 
Reply With Quote
 
 
 
 
Chris Tacke, eMVP
Guest
Posts: n/a
 
      11th Mar 2005
> 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


 
Reply With Quote
 
amitkhemlani@gmail.com
Guest
Posts: n/a
 
      11th Mar 2005
The sound is not for people to hear. I have handhelds(through out the
USA) which have data about customers. I need the data transferred to
one central location.

The sound what I am trying to generate is of data which I need to
transfer over modems to a central location. The transfer rate of the
receiver is set at 9600 baud, so I need to generate the sound for such
a less duration of 0.1ms.

 
Reply With Quote
 
Chris Tacke, eMVP
Guest
Posts: n/a
 
      11th Mar 2005
So why not use a modem and serial port?

--
Chris Tacke
Co-founder
OpenNETCF.org
Has OpenNETCF helped you? Consider donating to support us!
http://www.opennetcf.org/donate


<(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> The sound is not for people to hear. I have handhelds(through out the
> USA) which have data about customers. I need the data transferred to
> one central location.
>
> The sound what I am trying to generate is of data which I need to
> transfer over modems to a central location. The transfer rate of the
> receiver is set at 9600 baud, so I need to generate the sound for such
> a less duration of 0.1ms.
>



 
Reply With Quote
 
amitkhemlani@gmail.com
Guest
Posts: n/a
 
      11th Mar 2005
Well. Right now we have a modem doing it. But we now want the handheld
device to generate sound from its speakers, with the speaker being held
near a phone. So that the data can get sent to the receiving modem
which is set to receive at 9600 baud rate.

I know its a little difficult to do this. Do you think it is possible?
The whole reason behind this is that all the data has to sent to the
central receiving station whenever it is collected. The data is
normally collected on the field by sales reps. They do not have modems
to transfer the data. They get to the nearest phone booth and use the
phone to transfer the data.

Hope to hearing from you soon.

Best Regards,
Amit

 
Reply With Quote
 
amitkhemlani@gmail.com
Guest
Posts: n/a
 
      11th Mar 2005
"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."

Well I do understand what u mean here but how do i go about with this
problem. Well I mean which functions do I need to use to be able to
send the data to the audio driver?
Thanks.

Amit

 
Reply With Quote
 
Chris Tacke, eMVP
Guest
Posts: n/a
 
      11th Mar 2005
Take a look at the OpenNETCF.Multimedia.Audio.Player

--
Chris Tacke
Co-founder
OpenNETCF.org
Has OpenNETCF helped you? Consider donating to support us!
http://www.opennetcf.org/donate


<(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> "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."
>
> Well I do understand what u mean here but how do i go about with this
> problem. Well I mean which functions do I need to use to be able to
> send the data to the audio driver?
> Thanks.
>
> Amit
>



 
Reply With Quote
 
Chris Tacke, eMVP
Guest
Posts: n/a
 
      11th Mar 2005
IMHO it's as close to an insane idea as I've seen in quite some time.

--
Chris Tacke
Co-founder
OpenNETCF.org
Has OpenNETCF helped you? Consider donating to support us!
http://www.opennetcf.org/donate


<(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Well. Right now we have a modem doing it. But we now want the handheld
> device to generate sound from its speakers, with the speaker being held
> near a phone. So that the data can get sent to the receiving modem
> which is set to receive at 9600 baud rate.
>
> I know its a little difficult to do this. Do you think it is possible?
> The whole reason behind this is that all the data has to sent to the
> central receiving station whenever it is collected. The data is
> normally collected on the field by sales reps. They do not have modems
> to transfer the data. They get to the nearest phone booth and use the
> phone to transfer the data.
>
> Hope to hearing from you soon.
>
> Best Regards,
> Amit
>



 
Reply With Quote
 
amitkhemlani@gmail.com
Guest
Posts: n/a
 
      11th Mar 2005
Do I need to use the DirectSound Namespace for doing it?

 
Reply With Quote
 
amitkhemlani@gmail.com
Guest
Posts: n/a
 
      11th Mar 2005
Well how do i convert my stream of bits to a wave file. Which will then
be the input to the function in the name space you gave me.

I do the following convert each data character to its equivalent ascii,
then i convert ascii to its bit equivalent with the start and stop bits
in place.

Do I need to convert it to a wave file, is there any other way to do
it?

Hope to hearing from you soon. Really appreciate the help.

Best Regards,
Amit

Well we have to try to satisfy client requirements....if its possible..

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
A7V133-VM + PCI video = BEEP BEEP BEEP BEEP? Lost Asus Motherboards 2 13th Nov 2003 05:33 AM
Beep function in VB.NET Tim Nelson Microsoft Dot NET Compact Framework 3 23rd Sep 2003 06:00 PM
Beep function Ahmed Fat-hi Microsoft VC .NET 1 22nd Sep 2003 11:03 AM
Re: Beep function as trigger Paul Ivanov Microsoft Dot NET Framework Forms 1 26th Aug 2003 06:22 PM
Re: Beep function as trigger Herfried K. Wagner [MVP] Microsoft Dot NET Framework Forms 0 26th Aug 2003 04:38 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 03:56 AM.