FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Problem with function Tone FWH 8.04
Posts: 181
Joined: Thu Apr 17, 2008 02:38 PM
Problem with function Tone FWH 8.04
Posted: Tue May 20, 2008 11:27 AM
function Main()

   alert("Test sounds")
   Tone(  100, 1 )
   Tone(  200, 1 )
   Tone(  300, 1 )
   Tone(  400, 1 )
   Tone(  500, 1 )
   Tone(  600, 1 )
   Tone(  700, 1 )
   Tone(  800, 1 )
   Tone(  900, 1 )
   Tone( 1000, 1 )

return nil


OS. Xp Professional
xHarbour CVS
BCC 55
Posts: 182
Joined: Tue Oct 18, 2005 10:01 AM
Re: Problem with function Tone FWH 8.04
Posted: Tue May 20, 2008 11:49 AM
mauri.menabue wrote:
function Main()

   alert("Test sounds")
   Tone(  100, 1 )
   Tone(  200, 1 )
   Tone(  300, 1 )
   Tone(  400, 1 )
   Tone(  500, 1 )
   Tone(  600, 1 )
   Tone(  700, 1 )
   Tone(  800, 1 )
   Tone(  900, 1 )
   Tone( 1000, 1 )

return nil


Try to add:

request HB_GT_GUI_DEFAULT

in the main function.

Regards,

Toninho.
Posts: 223
Joined: Thu Dec 01, 2005 03:34 PM
Problem with function Tone FWH 8.04
Posted: Tue May 20, 2008 01:43 PM

What actually is the problem? Are the sounds not being generated?

Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM
Problem with function Tone FWH 8.04
Posted: Tue May 20, 2008 02:20 PM

Roger,

Tone() is only supported in some GT modules for Harbour/xHarbour

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 181
Joined: Thu Apr 17, 2008 02:38 PM
Problem with function Tone FWH 8.04
Posted: Tue May 20, 2008 07:23 PM

Roger

This is the problem, but with

request HB_GT_GUI_DEFAULT

is now OK :wink:

thank Toninho

Posts: 223
Joined: Thu Dec 01, 2005 03:34 PM
Problem with function Tone FWH 8.04
Posted: Wed May 21, 2008 08:59 PM

Okay. But when I link in gtgui.lib and put REQUEST HB_GT_GUI_DEFAULT at the top of my main prg, I get a link error with xHb (commercial Nov '07):

unresolved external symbol: _HB_FUN_HB_GT_GUI_DEFAULT

Any suggestions?

  • Roger
Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM
Problem with function Tone FWH 8.04
Posted: Wed May 21, 2008 09:17 PM
Roger,

Try this code from your PRG (same parameters as Tone()):
#pragma BEGINDUMP

#include <hbapi.h>
#include <windows.h>

HB_FUNC( BEEP )
{
   Beep( hb_parnl( 1 ), hb_parnl( 2 ) * 1000 );
}

#pragma ENDDUMP
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 223
Joined: Thu Dec 01, 2005 03:34 PM
Problem with function Tone FWH 8.04
Posted: Wed May 21, 2008 09:37 PM

Antonio,

I tried it and nothing happened (no sound).

  • Roger :(
Posts: 223
Joined: Thu Dec 01, 2005 03:34 PM
Problem with function Tone FWH 8.04
Posted: Wed May 21, 2008 09:45 PM

Antonio,

Whoops! I misunderstood how to use it. I figured it out, and now it works - I now get my beep.

Thanks!

  • Roger
Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM
Problem with function Tone FWH 8.04
Posted: Wed May 21, 2008 09:59 PM

Roger,

What Windows version are you using and how you made it work ?

Here it is not working (on Vista) :-(

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 223
Joined: Thu Dec 01, 2005 03:34 PM
Problem with function Tone FWH 8.04
Posted: Wed May 21, 2008 10:00 PM

Antonio,

I don't know if anybody noticed, but though you are a quarter of the way around the world from where I'm sitting, you answered my question with a spot-on solution in just 18 minutes! And I had my problem fixed in my app in less than an hour.

I think that is PHENOMENAL customer service!

Thank you very much indeed!

  • Roger :D
Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM
Problem with function Tone FWH 8.04
Posted: Wed May 21, 2008 10:03 PM

I guess that its because I don't have an internal speaker

Do you hear it on your external speakers ?

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM
Problem with function Tone FWH 8.04
Posted: Wed May 21, 2008 10:05 PM

Roger,

Thanks for your kind words :-)

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 223
Joined: Thu Dec 01, 2005 03:34 PM
Problem with function Tone FWH 8.04
Posted: Thu May 22, 2008 01:54 AM

Antonio,

Regarding type of speakers I'm using: internal.

Version of Windows where I tested: XP Professional.

It sounded normal in this configuration.

I'll hook up some external speakers in the morning and see if it works there, and will also test on my Vista computer.

Then I'll report the results.

  • Roger
Posts: 223
Joined: Thu Dec 01, 2005 03:34 PM
Problem with function Tone FWH 8.04
Posted: Thu May 22, 2008 02:11 AM

Antonio,

It also works fine here on Vista Home Premium, internal speakers.

  • Roger