PlaySound does n't always play the sound file

PlaySound does n't always play the sound file

Post by TXVydGh » Sat, 06 Oct 2007 23:44:00


Hi,
I use the below code to play a wave file continously on a windows mobile 5.0
device.
i stop the playing of the wave file on press another button.

But after some time the WCE_PlaySound returns 1 but does not play the sound.
This continues for a few minutes.
During this time i cannot play any sound.

Can someone tell me why this is happening and how i can over come this
problem.

[DllImport("coredll.dll", EntryPoint = "PlaySound", SetLastError = true)]
public extern static int WCE_PlaySound(string szSound, IntPtr hMod, int
flags);

public static void PlaySound(string fileName)
{
if (fileName != null && fileName != "")
{
int iSuc = WCE_PlaySound(RingTone, IntPtr.Zero,
(int)(Flags.SND_ASYNC | Flags.SND_FILENAME | Flags.SND_LOOP));
if(iSuc == 0)
MessageBox.Show("Error");
}
}

public static void StopPlaySound(string File)
{
int SND_PURGE = 0x0040;
WCE_PlaySound(File, IntPtr.Zero, SND_PURGE);
}

Thanks in Advance,
Murthy
 
 
 

PlaySound does n't always play the sound file

Post by Paul G. To » Sun, 07 Oct 2007 00:10:31

Device details?

Paul T.

 
 
 

PlaySound does n't always play the sound file

Post by TXVydGh » Sun, 07 Oct 2007 00:49:04

Its a windows mobile 5.0 based device from symbol [MC 9090 Series].
 
 
 

PlaySound does n't always play the sound file

Post by Paul G. To » Sun, 07 Oct 2007 02:39:38

You should definitely contact Symbol and tell them about this. My guess
would be that this is unique to them, unless your testing has concluded
otherwise. If it has, indicate that here, along with the characteristics of
the sound, how long it takes for this to fail, the other device(s) that
you've tested on and whether this only fails with your sound or with every
sound you've tried.

Paul T.
 
 
 

PlaySound does n't always play the sound file

Post by rmlaanbroe » Fri, 30 Nov 2007 23:22:21

On 5 okt, 18:39, "Paul G. Tobey [eMVP]" <p space tobey no spam AT no


I don't think it is a device specific problem, I think it is a Windows
Mobile 2005 specific problem.
I too have problems playing wav files. On a Psion Workabout Pro.
I never had this problem on other mobile OS's, not even on the same
Psion with CE 4.2.