Sound is not playing

Sound is not playing

Postby xhbcoder » Tue Aug 07, 2007 6:27 pm

Hi all,

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

Environment: windows xp, clip52 fw24

Thanks,

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

Postby Antonio Linares » Thu Aug 09, 2007 10:45 am

Jose,

Try it this way. Here its working fine with Clipper and Vista:
Code: Select all  Expand view
#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
User avatar
Antonio Linares
Site Admin
 
Posts: 42099
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Sound still not playing in Windows XP

Postby xhbcoder » Thu Aug 09, 2007 4:44 pm

Antonio,

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

Thanks,

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

Postby Antonio Linares » Thu Aug 09, 2007 7:06 pm

Jose,

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

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42099
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

The sounds good.

Postby xhbcoder » Thu Aug 09, 2007 8:29 pm

Antonio,

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

Regards,

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

Postby Antonio Linares » Thu Aug 09, 2007 8:45 pm

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

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42099
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Sounds not playing

Postby xhbcoder » Thu Aug 09, 2007 9:06 pm

Horn.wav, startup.wav. I can send you the file if you need.
xhbcoder
 
Posts: 100
Joined: Wed Oct 04, 2006 4:50 pm
Location: USA

Postby Antonio Linares » Thu Aug 09, 2007 11:58 pm

Jose,

Got your files and this code is working fine with Clipper, FW 7.07 and Vista 32:
Code: Select all  Expand view
#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
User avatar
Antonio Linares
Site Admin
 
Posts: 42099
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

I'm ever gotten that promble like you.

Postby Peter » Wed Aug 22, 2007 3:53 am

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.
Peter
 
Posts: 31
Joined: Wed Oct 19, 2005 3:30 am


Return to FiveWin for CA-Clipper

Who is online

Users browsing this forum: No registered users and 10 guests