gracias lo he probado y va perfecto lo he resumido y a quedado asi:.
se hace una llamada a la procedure sonido con una variable
***************************
wsonido="nombredelwav.wav"
do sonido
***************************
PROCEDURE SONIDO
#include "inkey.ch"
#include "directry.ch"
#include "dll.ch"
#define SND_SYNC 0
#define SND_ASYNC 1
#define SND_FILENAME 131072
#define SND_PURGE 64
#define MB_ICONHAND 16
#define MB_OK 0
#define MB_DEFAULT -1
*****************
LOCAL aPlayField
LOCAL i
LOCAL aSize
StopSound()
PlayWaveFile("&WSONIDO.")
INKEY(x) && x depende de la duracion del sonido, esto es para que termine de sonar antes del llegar al return, si la procedure queda abierta no es necesaria esta linea.
RETURN
*************************
PROCEDURE StopSound()
DllCall("WINMM.DLL",DLL_STDCALL,"PlaySoundA",0,0,0)
DllCall("WINMM.DLL",DLL_STDCALL,"PlaySoundA",0,0,SND_PURGE)
RETURN
*************************
PROCEDURE PlayWaveFile(cFilename)
DllCall("WINMM.DLL",DLL_STDCALL,"PlaySoundA",cFileName,0, SND_FILENAME + SND_ASYNC)
RETURN
**********************
#ifdef __WIN32__
DLLFUNCTION MessageBeep(nMsgType) USING STDCALL FROM "USER32.DLL"
#endif
#ifdef __WIN32__
DLLFUNCTION waveOutGetNumDevs() USING STDCALL FROM "WINMM.DLL"
#endif
***********************