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 7: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: 135
Joined: Tue Oct 30, 2012 8:18 pm
Location: France - LFOH
Callsign: F-GCLM
Version: 2018.2.0
OS: Linux Mint 18.3

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

Postby bugman » Tue May 10, 2016 9: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: 1476
Joined: Thu Mar 19, 2015 9:01 am
Version: next

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

Postby Hooray » Tue May 10, 2016 10: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: 11100
Joined: Tue Mar 25, 2008 8:40 am

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

Postby clm76 » Tue May 10, 2016 11:01 am

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: 135
Joined: Tue Oct 30, 2012 8:18 pm
Location: France - LFOH
Callsign: F-GCLM
Version: 2018.2.0
OS: Linux Mint 18.3

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

Postby erik » Tue May 10, 2016 9: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
erik
 
Posts: 1481
Joined: Thu Nov 01, 2007 1:41 pm

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

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

Thanks for this information.

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

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

Postby bugman » Wed May 11, 2016 7: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: 1476
Joined: Thu Mar 19, 2015 9:01 am
Version: next

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

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

Ok. Bug report done, nr 1871.
clm76
 
Posts: 135
Joined: Tue Oct 30, 2012 8:18 pm
Location: France - LFOH
Callsign: F-GCLM
Version: 2018.2.0
OS: Linux Mint 18.3

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

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

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

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

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

Postby Marius_A » Wed Oct 26, 2016 12: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: 89
Joined: Wed Dec 04, 2013 2:20 pm

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

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

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


Return to Nasal

Who is online

Users browsing this forum: No registered users and 1 guest