Problem plaing Wav on CE5

D

DPCons

Hi
I'm using tis code in my procedure (it's taken from MSDN lib)

public class SuonaWave
{
private enum Flags
{
SND_SYNC = 0x0000,
SND_ASYNC = 0x0001,
SND_NODEFAULT = 0x0002,
SND_MEMORY = 0x0004,
SND_LOOP = 0x0008,
SND_NOSTOP = 0x0010,
SND_NOWAIT = 0x00002000,
SND_ALIAS = 0x00010000,
SND_ALIAS_ID = 0x00110000,
SND_FILENAME = 0x00020000,
SND_RESOURCE = 0x00040004
}

[DllImport("CoreDll.DLL", EntryPoint = "PlaySound", SetLastError =
true)]
private extern static int MobilePlaySound(string szSound, IntPtr
hMod, int flags);

public void PlaySound(string fileName)
{
string pathsuono =
System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().GetName().CodeBase)+
"\\sound\\" + fileName.Trim() +".wav";
MobilePlaySound(pathsuono, IntPtr.Zero, (int)(Flags.SND_ASYNC |
Flags.SND_FILENAME));
}

It work well on WM 5, 6 and pocketpc2003.
When I try to use it on a CE5.0 device (symbol MC3000) simply doesn't play
anything!

What's wrong?

Marco Dal Pino
 
U

Ulrich Strauss (MCTS)

Hi Marco,

Do you have the Wavedevice in your CE Image?
And did you check sound is not muited? :)

Regards,
Ulrich
 
D

DPCons

Do you have the Wavedevice in your CE Image?
I don't know, but thinking about it I try to play the sound file from the
mediaplayer of the device and I hear the same "click" and not the correct
sound I expect!
Maybe a codec problem? But the files are standard Wav file, not mp3 or
other.

Any Idea?

And did you check sound is not muited? :)
Muted? NO.


Regards
Marco
 
U

Ulrich Strauss (MCTS)

DPCons said:
I don't know, but thinking about it I try to play the sound file from the
mediaplayer of the device and I hear the same "click" and not the correct
sound I expect!
Maybe a codec problem? But the files are standard Wav file, not mp3 or
other.

This definitly sounds like either the wavedevice is not in the image (check
your bsp settings) or the Mixer is disabled. Or maybe your hardware cannot
playback wav-files at all?

I had a similar problem with a CE5 device, where the BSP simply did not
support the wavedevice und thus no windows-sounds could be played.

-Ulrich
 
D

DPCons

The problem is that I haven't the BSP of this device because is a standard
device from Symbol (Mobile computer w/barcode reader).
I can only try installing a device driver (if exist) that manage the wave
file.
I'll try to ask to Symbol customer support.

Did you know a DIY simple manner to add it? (excluding the rebuilt of the
BSP)

Many thanks.

Marco
 
U

Ulrich Strauss (MCTS)

You can always add a device driver at runtime. And since it's ce5 even a
kernelmode driver is no real problem.
Check with the support, what they say. If you just need to install an
additional device driver I can help you to get it onto the device.

-Ulrich
 
D

DPCons

Well
the Symbol support confirm me that the device MC3000 doesn't support wav
(and any other media file) playing.

It's not possible at all!

So at this point I'm very curious to know if is possible to retrieve some
device driver (from other devices for example) and use them to play sound on
my device.

You think it possible?

Regards
Marco
 
C

Chris Tacke, eMVP

I can't imagine it's possible without a very solid understanding of their
hardware, and I doubt they're going to provide that info.


--

Chris Tacke, Embedded MVP
OpenNETCF Consulting
Giving back to the embedded community
http://community.OpenNETCF.com
 

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

Similar Threads

how To Play sound 4
Question about PInvokeStackImbalance? Thanks 2
Sound play problem! 2
Sound 8
play sound file 1
Play message 3

Top