Re: .wav files on WinCE emulator using evc++4.0



the PlaySound function just plays the WinCE emulator system default
sound.
The main problem is that the application is not able to run
anything(sound in my case) from the Windows(NT) that i'm using..
hope u got it now....



Paul G. Tobey [eMVP] wrote:

I don't follow. PlaySound( filename, , SND_FILENAME ), no?

Paul T.

"varun" <varun.a84@xxxxxxxxx> wrote in message
news:1160374158.027075.90110@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Thank you for the response Paul,

The goal as of now is to make the application for WinCE emulator. I
tried using the PlaySound() function to generate a sound equivalent to
one wave....and it does produce sound. But my aim is to run wavefile
rather than a wavesound.
I wrote the following....
void chkdevice()
{
UINT devid = 1;
if(devid ==waveOutGetNumDevs())
{
MessageBox(NULL, TEXT("Device Found!"),
TEXT("Window!"),MB_ICONEXCLAMATION | MB_OK);
devid++;
}
if(waveOutOpen(&hwo, devid, &wfex, unsigned long(WaveOutProc), 0,
CALLBACK_FUNCTION) == MMSYSERR_NOERROR)
{
MessageBox(NULL, TEXT("Device Found!"),
TEXT("Window!"),MB_ICONEXCLAMATION | MB_OK);
}

The first loop always runs for devid==1...but if i connect other
devices to the system, viz.headphone, the function waveOutGetNumDevs()
still returns 1. I am not able to understand which device is it
detecting, because if it is the system speakers(i'm using a TFT), then
the waveOutOpen function should also return true, and display the
message in the MessageBox.
I think something needs to be done with the handle [hwo].
Please suggest something.



Paul G. Tobey [eMVP] wrote:

Why? Isn't the goal to make the code run on a real device? Well,
anyway,
what's the result of using the Sounds Control Panel applet to play some
of
the system sounds? Do you get sound from the PC's audio system? If so,
then you should be able to use PlaySound() to play a WAV file, assuming
it's
encoded in a way that's compatible with the WAV stuff in Windows CE.

Paul T.

"varun" <varun.a84@xxxxxxxxx> wrote in message
news:1160135762.374132.58540@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
I am trying to make an application in eVC++4.0, which will run .wav
audio files on WinCE emulator version(no platform builder).
Can anyone provide help regarding the same?



.



Relevant Pages

  • Re: Beep Beep
    ... wait until it is done playing. ... while the sound continues to play. ... First, Declare PlaySound yourself, and the SND_MEMORY flag. ...
    (microsoft.public.vb.general.discussion)
  • Re: Simultaneous PlaySound
    ... However I cannot reproduce this behavior from a single process: ... PlaySound either refuses to play the second sound (SND_NOSTOP ...
    (microsoft.public.win32.programmer.mmedia)
  • Re: .wav files on WinCE emulator using evc++4.0
    ... you can play any sound file that ... PlaySound supports, if you pass the right flags. ... sure PlaySound will play it. ... Paul G. Tobey wrote: ...
    (microsoft.public.windowsce.embedded.vc)
  • Re: PlaySound SND_NOSTOP doesnt work
    ... I think that when you play a sound asynchronously, the system does just that, sends it off to the bowels of the system somewhere and plays it when it gets around to it. ... Using the cout probably causes some form of synchronisation that allows your next call to operate correctly. ... I am using timers and PlaySound to play some voice messages ...
    (microsoft.public.vc.mfc)
  • Re: .wav files on WinCE emulator using evc++4.0
    ... The goal as of now is to make the application for WinCE emulator. ... one wave....and it does produce sound. ... then you should be able to use PlaySound() to play a WAV file, ...
    (microsoft.public.windowsce.embedded.vc)

Loading