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



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: .wav files on WinCE emulator using evc++4.0
    ... The goal as of now is to make the application for WinCE emulator. ... tried using the PlaySound() function to generate a sound equivalent to ... what's the result of using the Sounds Control Panel applet to play some ...
    (microsoft.public.windowsce.embedded.vc)
  • Re: .wav files on WinCE emulator using evc++4.0
    ... PlaySound(filename,, SND_FILENAME), no? ... The goal as of now is to make the application for WinCE emulator. ... one wave....and it does produce sound. ... Paul G. Tobey wrote: ...
    (microsoft.public.windowsce.embedded.vc)
  • Re: How to add sound to your Vb form?
    ... the answer is correct then different sound came out. ... The example plays a wav file that I think probably already exists on ... Private Declare Function PlaySound Lib "winmm.dll" _ ...
    (comp.lang.basic.visual.misc)
  • PlaySound resource wont play sound in emulator..
    ... sound, and while I can get sound to play if it's a system sound either ... application through the emulator: ... I have the wav file embedded in the resources properly, ... It's just that PlaySound returns false everytime. ...
    (microsoft.public.windowsce.embedded)
  • Re: The Beep Function.
    ... of playing the sound. ... sound sounds when the WAV file stops playing. ... This is called "fade out". ... This will give you how many voltage samples need to be "faded in". ...
    (comp.lang.basic.visual.misc)