Sound on Pocket PC

Sound on Pocket PC

Postby Raymond Fischbach » Sun Aug 02, 2009 8:14 am

Hello all,

I would like to play a wav file to give different sounds for various purposes and to replace the PC sound which is not very "attractive".

I tried to use the following function:
Code: Select all  Expand view  RUN

#define SND_SYNC      0
#define SND_ASYNC     1
SndPlaySound("\Start.wav",SND_ASYNC)
 


But it doesn't seem to be supporrted as I get the following message:

Fmesure.obj : error LNK2001: unresolved external symbol HB_FUN_SNDPLAYSOUND

Can someone tell me how I can overcome this problem?

Many thanks in advance,
Raymond Fischbach
www.mouches.org
User avatar
Raymond Fischbach
 
Posts: 48
Joined: Sun Oct 30, 2005 9:29 am
Location: Belgium

Re: Sound on Pocket PC

Postby Enrico Maria Giordano » Sun Aug 02, 2009 1:46 pm

Code: Select all  Expand view  RUN
#pragma BEGINDUMP

#include "windows.h"
#include "mmsystem.h"
#include "hbapi.h"


LPWSTR AnsiToWide( LPSTR );


HB_FUNC( SNDPLAYSOUND )
{
    LPWSTR pW = AnsiToWide( hb_parc( 1 ) );
    hb_retnl( sndPlaySound( pW, hb_parni( 2 ) ) );
    hb_xfree( pW );
}

#pragma ENDDUMP


EMG
User avatar
Enrico Maria Giordano
 
Posts: 8718
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: Sound on Pocket PC

Postby Raymond Fischbach » Sun Aug 02, 2009 2:57 pm

Hello Enrico,

Once more you give me the right information.
It works perfectly.

Thank you,
Raymond
Raymond Fischbach
www.mouches.org
User avatar
Raymond Fischbach
 
Posts: 48
Joined: Sun Oct 30, 2005 9:29 am
Location: Belgium


Return to FiveWin for Pocket PC

Who is online

Users browsing this forum: No registered users and 4 guests