Hi - I'm trying to play mp3 files from my winows mobile application using the newly supported mp3-playing function SndPlaySync ( also tried SndPlayAsync ). I made the simplest program, just attached the function to a WM_KEYDOWN event. ( code attached below ). But stil there is always 0.5-2 seconds of wait before the program plays the mp3. When i simply use PlaySound, and try to play a .wav file, it works instateneously. What can i do?
Code :
This works too slow
case WM_KEYDOWN:
PlaySound(c_szMid,NULL,NULL);
HSOUND hSound;
HRESULT hr;
SndOpen(c_szMid, &hSound);
hr = SndPlayAsync(hSound, 0);
hr = SndClose(hSound);
And this works fast :
case WM_KEYDOWN:
PlaySound(c_szMid,NULL,NULL);
Would be grateful for any ideas!
Thanks!
Dan