Sound is not playing

Post Reply
xhbcoder
Posts: 100
Joined: Wed Oct 04, 2006 4:50 pm
Location: USA

Sound is not playing

Post by xhbcoder »

Hi all,

What may be the cause of function sndPlaySound to fail. The speaker is functioning correctly.

Environment: windows xp, clip52 fw24

Thanks,

Jose
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Post by Antonio Linares »

Jose,

Try it this way. Here its working fine with Clipper and Vista:

Code: Select all

#include "FiveWin.ch"

function Main()

   SndPlaySound( "test.wav", 0 )

return nil

DLL FUNCTION SndPlaySound( cFile AS LPSTR, nType AS WORD ) AS BOOL PASCAL LIB "MMSYSTEM.DLL"
Last edited by Antonio Linares on Thu Aug 09, 2007 11:55 pm, edited 1 time in total.
regards, saludos

Antonio Linares
www.fivetechsoft.com
xhbcoder
Posts: 100
Joined: Wed Oct 04, 2006 4:50 pm
Location: USA

Sound still not playing in Windows XP

Post by xhbcoder »

Antonio,

I follow your sugesttion but, the sound is still not playing. The function sndPlaySound return false.

Thanks,

Jose
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Post by Antonio Linares »

Jose,

is you wav file ok ? Can you play it with windows media player ?
regards, saludos

Antonio Linares
www.fivetechsoft.com
xhbcoder
Posts: 100
Joined: Wed Oct 04, 2006 4:50 pm
Location: USA

The sounds good.

Post by xhbcoder »

Antonio,

Thanks for the quick reply. The file sounds good with windows media player.

Regards,

Jose
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Post by Antonio Linares »

whats the name (including its path) of the wav file ?
regards, saludos

Antonio Linares
www.fivetechsoft.com
xhbcoder
Posts: 100
Joined: Wed Oct 04, 2006 4:50 pm
Location: USA

Sounds not playing

Post by xhbcoder »

Horn.wav, startup.wav. I can send you the file if you need.
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Post by Antonio Linares »

Jose,

Got your files and this code is working fine with Clipper, FW 7.07 and Vista 32:

Code: Select all

#include "FiveWin.ch"

function Main() 

   SndPlaySound( "startup.wav", 0 ) 

return nil 

DLL FUNCTION SndPlaySound( cFile AS LPSTR, nType AS WORD ) AS BOOL PASCAL LIB "MMSYSTEM.DLL" 
regards, saludos

Antonio Linares
www.fivetechsoft.com
Peter
Posts: 31
Joined: Wed Oct 19, 2005 3:30 am

I'm ever gotten that promble like you.

Post by Peter »

I'm ever gotten that promble like you. But if the WAV file not long time it work. I think the WAV file not over 2 Minute be work fine.
Post Reply