Vibrate and play sound on PDA
Hello,
VS 2008 WM 5/6
I am developing a smart device in C#.
I want to access the PDA so that is will vibrate or play a sound when a condition is meet.
for example:
if(condition is true)
vibrate the PDA and play a sound
end if
However, I am not sure how to do this in code. The only thing I can think of is using Diagnotic.Process. However, I am not sure if this is the correct way to do this.
Any suggestions would be most helpfull,
Many thanks,
Steve
Re: Vibrate and play sound on PDA
Hi,
you can certainly play a wav file etc using the API and PlaySound.
For vibration, you can use the opennetcf, and I think Peter Foot has some notes on it at www.peterfoot.net
HTH
Pete
Re: Vibrate and play sound on PDA
Hello,
Does the sound player only play wav files.
vb Code:
System.Media.SoundPlayer sp = new SoundPlayer();
sp.SoundLocation = "\\Windows\\Alarm2.wav";
sp.Play();
Is it possible to play mp3 and wma files.
When I tried this. I got this error message: "Wave file header is corrupt"
Many thanks,
Steve
Re: Vibrate and play sound on PDA
You cannot play mp3 and wma.
I found a sample that may help you but you need to APIize :) (good ol CF 2.0 )
http://www.codeproject.com/KB/mobile...r_for_ppc.aspx