Re: PlaySound function not work



You say, "But it works fine if we use media player to play wav files." Have
you tried playing THAT SPECIFIC file using Media Player? You might also try
playing one or more of the .WAV files found in the \windows folder using
PlaySound(). Could be that this particular file is in a format that CE
doesn't understand; that's my first guess.

Paul T.

"Victor Lai" <VictorLai@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:3808B4F2-CFE0-4E4D-979A-5598CD1DCDF9@xxxxxxxxxxxxxxxx
Hi,
Our system is Windows CE 5.0 + PXA270.
We found the Playsound API does not work on our system. We use standard
mainstone BSP. But it works fine if we use media player to play wav files.

PlaySound(_T("\\1.wav"), NULL, SND_FILENAME);

1. What could go wrong in this scenario?
2. What's the difference of using PlaySound API and play wav file using
media player on the kernel/driver point of view?

Thanks


.



Relevant Pages

  • MyDVD Makes MP10 Quit Working?
    ... We just installed Media Player 10, Movie Maker 2, XP SP2, ... now Media Player will not play wav files any more. ...
    (microsoft.public.windowsxp.moviemaker)
  • Codec Error
    ... My Windows Media Player will not play wav files. ... The YUY2 codec is required to play this file ...
    (microsoft.public.windowsmedia.player)
  • Re: How can i play a sound in VB.NET?
    ... If you just want to play wav files, than you can P/Invoke ... the playsound api. ... Process.Start passing in the player and the file. ...
    (microsoft.public.dotnet.general)
  • Re: Adding Sound file to C# Application
    ... The link posted by the first responder appears to only play WAV files. ... If you want to play an MP3 clip just just a MediaPlayer control. ... Can I add that any application that insists on playing sounds when I ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: polling wavplay
    ... I would use something like DirectX to handle the playing of the files. ... You should be able to get events as to when the audio file starts and stops ... > I used the class on CodeGuru to play wav files; ... > In my application however I play a number of wav files in a sequence. ...
    (microsoft.public.dotnet.languages.csharp)