Results 1 to 4 of 4

Thread: Vibrate and play sound on PDA

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Dec 2001
    Posts
    1,331

    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
    steve

  2. #2
    Frenzied Member
    Join Date
    Oct 2005
    Posts
    1,286

    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
    Pete Vickers
    MVP - Device Application Development
    http://www.gui-innovations.com http://mobileworld.appamundi.com/blogs/

  3. #3

    Thread Starter
    Frenzied Member
    Join Date
    Dec 2001
    Posts
    1,331

    Re: Vibrate and play sound on PDA

    Hello,

    Does the sound player only play wav files.

    vb Code:
    1. System.Media.SoundPlayer sp = new SoundPlayer();
    2. sp.SoundLocation = "\\Windows\\Alarm2.wav";
    3. 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
    steve

  4. #4
    King of sapila
    Join Date
    Oct 2006
    Location
    Greece
    Posts
    6,763

    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width