Problem with function Tone FWH 8.04

User avatar
mauri.menabue
Posts: 89
Joined: Thu Apr 17, 2008 2:38 pm

Problem with function Tone FWH 8.04

Post by mauri.menabue »

Code: Select all

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
toninhofwi
Posts: 161
Joined: Tue Oct 18, 2005 10:01 am

Re: Problem with function Tone FWH 8.04

Post by toninhofwi »

[quote="mauri.menabue"]

Code: Select all

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.
User avatar
Roger Seiler
Posts: 223
Joined: Thu Dec 01, 2005 3:34 pm
Location: Nyack, New York, USA
Contact:

Post by Roger Seiler »

What actually is the problem? Are the sounds not being generated?
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Post by Antonio Linares »

Roger,

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

Antonio Linares
www.fivetechsoft.com
User avatar
mauri.menabue
Posts: 89
Joined: Thu Apr 17, 2008 2:38 pm

Post by mauri.menabue »

Roger

This is the problem, but with

request HB_GT_GUI_DEFAULT

is now OK :wink:

thank Toninho
User avatar
Roger Seiler
Posts: 223
Joined: Thu Dec 01, 2005 3:34 pm
Location: Nyack, New York, USA
Contact:

Post by Roger Seiler »

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
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Post by Antonio Linares »

Roger,

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

Code: Select all

#pragma BEGINDUMP

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

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

#pragma ENDDUMP
Last edited by Antonio Linares on Wed May 21, 2008 10:06 pm, edited 2 times in total.
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Roger Seiler
Posts: 223
Joined: Thu Dec 01, 2005 3:34 pm
Location: Nyack, New York, USA
Contact:

Post by Roger Seiler »

Antonio,

I tried it and nothing happened (no sound).

- Roger :(
User avatar
Roger Seiler
Posts: 223
Joined: Thu Dec 01, 2005 3:34 pm
Location: Nyack, New York, USA
Contact:

Post by Roger Seiler »

Antonio,

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

Thanks!

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

Post by Antonio Linares »

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
User avatar
Roger Seiler
Posts: 223
Joined: Thu Dec 01, 2005 3:34 pm
Location: Nyack, New York, USA
Contact:

Post by Roger Seiler »

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
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Post by Antonio Linares »

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
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Post by Antonio Linares »

Roger,

Thanks for your kind words :-)
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Roger Seiler
Posts: 223
Joined: Thu Dec 01, 2005 3:34 pm
Location: Nyack, New York, USA
Contact:

Post by Roger Seiler »

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
User avatar
Roger Seiler
Posts: 223
Joined: Thu Dec 01, 2005 3:34 pm
Location: Nyack, New York, USA
Contact:

Post by Roger Seiler »

Antonio,

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

- Roger
Post Reply