I have a basic Windows CE 5 platform that I have built. I have
included .NET 2.0. I wrote an application to go along with it to play
audio files.
I have the following code:
[DllImport("CoreDll.DLL", EntryPoint = "PlaySound", SetLastError =
true)]
private extern static int WCE_PlaySound(string szSound, IntPtr hMod,
int flags);
WCE_PlaySound("asterisk.wav", IntPtr.Zero, (int)(Flags.SND_ASYNC |
Flags.SND_FILENAME));
This works and actually plays the asterisk.wav file as it should. If I
have this line:
WCE_PlaySound("dialtone.wav", IntPtr.Zero, (int)(Flags.SND_ASYNC |
Flags.SND_FILENAME));
It does not work. All I get is a short static sound. You will notice
they are exactly the same except for the name of the file. I have
verified that both files play just fine when I play them in windows xp
from the release folder for my platform. They are both the same
format. One is just bigger than the other one.
I have tried this with several files and the only one that has
actually played is the asterisk.
If I go into the control panel applet for sound they all play.
I am stumped.