Playing sound

S

Sidebp

Hi,

I know this one has been done to death, but I'm having no luck!

I have developed a barcode scanning app for a PSC falcon 4420 (pocket
pc). When a scan succeeds or fails i want to play a sound. I've tried
using the OpenNETCF Multimedia.Audio.Player and this works fine,
however it seems to intermittently not play the sound.

Therefore my question is three fold:

- Is there anyway to play sound other than the opennetcf (Ive tried
various snippets from here with no luck)
- Why would the opennetcf not play the sound intermiettently? (ive
tried running it in a seperate thread)
- Has there ever been an implementation of the P/Invoke MessageBeep
that works? I'd prefer this to playing a streamed WAV file but cannot
use this. P/Invoking simply throws a MissingMethodException.

Thanks
 
P

Peter Foot [MVP]

In OpenNETCF.Windows.Forms you'll find a couple of useful classes which are
designed to match the desktop v2.0 framework:-
SystemSounds - wraps MessageBeep for playing preset system sounds
SoundPlayer - a simple class for playing .wav files
e.g.
SystemSounds.Asterisk.Play()
or
Dim sp As New SoundPlayer("\My Documents\MyWavFile.wav")
sp.Play()

Peter
 
S

Sidebp

Thanks for that - I've tried both and no luck I'm afraid - no errors
are thrown though
 
P

Peter Foot [MVP]

Hmm very strange, what generation of Pocket PC is the device? -
2000/2002/2003 etc Other software which plays audio works correctly?

Peter
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top