Board index FlightGear Development Nasal

fgcommand("play-audio-sample")

Nasal is the scripting language of FlightGear.

fgcommand("play-audio-sample")

Postby clm76 » Tue May 10, 2016 8:37 am

Hi,

It seems that fgcommand("play-audio-sample") is no longer supported in fg 2016.2.0.
Is there any reason ?
clm76
 
Posts: 204
Joined: Tue Oct 30, 2012 9:18 pm
Location: France - LFOH
Callsign: F-GCLM
Version: 2020.4.0
OS: Linux Mint 20.2

Re: fgcommand("play-audio-sample")

Postby bugman » Tue May 10, 2016 10:04 am

Hi,

The command should still be supported - it was never removed from the code and I can still see it there. It might be related to the other sound bug, though it is probably something else. Do you have an simple example so the problem can be reproduced?

Cheers,
Edward
bugman
Moderator
 
Posts: 1808
Joined: Thu Mar 19, 2015 10:01 am
Version: next

Re: fgcommand("play-audio-sample")

Postby Hooray » Tue May 10, 2016 11:50 am

Please don't send support requests by PM, instead post your questions on the forum so that all users can contribute and benefit
Thanks & all the best,
Hooray
Help write next month's newsletter !
pui2canvas | MapStructure | Canvas Development | Programming resources
Hooray
 
Posts: 12707
Joined: Tue Mar 25, 2008 9:40 am
Pronouns: THOU

Re: fgcommand("play-audio-sample")

Postby clm76 » Tue May 10, 2016 12:01 pm

An example :
Code: Select all
var sound = {
  path : getprop("/sim/fg-root")~"/Sounds",
  file : "thunder.wav",
  volume : 1};
 fgcommand("play-audio-sample", props.Node.new(sound));

no error in the consol or in my nasal file but ... no sound !

In fg 3.5, we found also the code fgcommand("play-audio-sample") in fgfs/flightgear/src/main/fg_commands.cxx line 1467, but it has disappeared in the same file in fg 2016.2.0

@Hooray : its the code of this wiki i'am trying to use.
clm76
 
Posts: 204
Joined: Tue Oct 30, 2012 9:18 pm
Location: France - LFOH
Callsign: F-GCLM
Version: 2020.4.0
OS: Linux Mint 20.2

Re: fgcommand("play-audio-sample")

Postby erik » Tue May 10, 2016 10:40 pm

It has been moved to src/Sound/soundmanager.cxx with this update:
https://sourceforge.net/p/flightgear/fl ... 5343b0fba/

So if it's now working that's certainly not intentional.

Erik
Current: Parachutist, Paraglider, Pterosaur, Pilatus PC-9M and variants, ERCO Ercoupe, Fokker Dr.1, Fokker 50, Fokker 100
Less active: Cessna T-37, T-38, Santa Claus. Previous: General Dynamics F-16. Worked on: Wright Flyer
erik
 
Posts: 2245
Joined: Thu Nov 01, 2007 2:41 pm

Re: fgcommand("play-audio-sample")

Postby clm76 » Wed May 11, 2016 6:42 am

Thanks for this information.

So, no way now to play sounds using nasal script ?
clm76
 
Posts: 204
Joined: Tue Oct 30, 2012 9:18 pm
Location: France - LFOH
Callsign: F-GCLM
Version: 2020.4.0
OS: Linux Mint 20.2

Re: fgcommand("play-audio-sample")

Postby bugman » Wed May 11, 2016 8:36 am

Could you create a bug report for this problem? That will help in fixing this clear bug. The more information, the better. Especially if you can include in-depth instructions to reproduce the issue. If a developer can quickly and easily reproduce the bug, then finding a solution is usually very quick.

Cheers,
Edward
bugman
Moderator
 
Posts: 1808
Joined: Thu Mar 19, 2015 10:01 am
Version: next

Re: fgcommand("play-audio-sample")

Postby clm76 » Wed May 11, 2016 10:02 am

Ok. Bug report done, nr 1871.
clm76
 
Posts: 204
Joined: Tue Oct 30, 2012 9:18 pm
Location: France - LFOH
Callsign: F-GCLM
Version: 2020.4.0
OS: Linux Mint 20.2

Re: fgcommand("play-audio-sample")

Postby bugman » Wed May 11, 2016 10:07 am

Cheers! For future reference, here is the link: https://sourceforge.net/p/flightgear/codetickets/1871/

Regards,
Edward
bugman
Moderator
 
Posts: 1808
Joined: Thu Mar 19, 2015 10:01 am
Version: next

Re: fgcommand("play-audio-sample")

Postby Marius_A » Wed Oct 26, 2016 1:19 pm

I am using FlightGear 2016.2.1 (windows)

fgcommand("play-audio-sample") is working if properties are assigned as follows:

    /sim/sound/chatter/enabled = "true"
    /sim/sound/chatter/volume = 1.0
Marius_A
 
Posts: 92
Joined: Wed Dec 04, 2013 3:20 pm

Re: fgcommand("play-audio-sample")

Postby RenanMsV » Sat Mar 25, 2017 1:41 am

March 2017 Still only working if chatter is enabled.
www.flightgearbrasil.com.br
www.fgbrazukas.wixsite.com/fgbrazukas
RenanMsV
 
Posts: 134
Joined: Thu Oct 27, 2016 3:02 am
Callsign: BR-RVD


Return to Nasal

Who is online

Users browsing this forum: No registered users and 0 guests