FGCom 3.0: Difference between revisions

From FlightGear wiki
Jump to navigation Jump to search
m (More syntax & grammar corrections. Moved bold itemized FAQ items into wikified sub-topics!)
m (→‎Linux ALSA Sound: Provide a brief description for the Linux ALSA Sound topic, including "things should just work" when defaults are used.)
Line 33: Line 33:


=== Linux ALSA Sound ===
=== Linux ALSA Sound ===
By defaults, most Linux ALSA systems should just work.  This is because by default Linux ALSA utilizes the DMix plugin when there is no $HOME/.asoundrc file.  Linux ALSA also, by default when using DMix unless further customized, resamples all audio to 48000hz.  If this is not the case, or if you speculate customizations have been performed by your Linux distribution, you may need to read further below on how to ensure ALSA's DMix and DSnoop plugins are used with FlightGear & FGCom.  The common side effect of possible customizations, FGCom does not playback (or record) sound.
(Reference [[Linux software audio mixing with FlightGear]]) <br />
(Reference [[Linux software audio mixing with FlightGear]]) <br />



Revision as of 23:56, 21 April 2014

FGCom 3.0
FGCom 3.0 logo
Developed by Holger Wirtz
Martin Spott
Csaba Halasz
Clément de l'Hamaide
Development status Active
License GNU GPL v2
Website

What is FGCom ?

FGCom is a voice communication feature. That way you can communicate with other pilots and airspace controllers during your flight.

The main idea is to reproduce the real aviation communication, in other words this feature is designed to make radio communication as real as possible during your flights.

FGCom is available by two ways:

  • Integrated into FlightGear (FGCom builtin): this is certainly the better solution because easier to use
  • External software (FGCom standalone): you should use this one only if you plan to use FGCom in a special case


A web interface is available where you can see who is connected in live, the history, and statistics: http://fgcom.flightgear.org


IMPORTANT:

  • FGCom builtin is available for FlightGear 3.0 or higher and is certainly the solution you are looking for because really easy to use.
  • FGCom standalone is only for those who want a complex, yet more flexible, setup or don't use FlightGear 3.0 or higher.
  • If you are not using FlightGear 3.0 or higher you have to read the FGCom standalone section and follow "If FlightGear is not installed" instructions.

FGCom 3.0 Builtin

This is concerning the now internal FGCom within FlightGear-3.0 versions, and later versions of FlightGear.

Installation

The good news here is that FlightGear has now an FGCom client built in the software. That means there is no additional installation step. If you have installed FlightGear you can immediately use FGCom.

Linux ALSA Sound

By defaults, most Linux ALSA systems should just work. This is because by default Linux ALSA utilizes the DMix plugin when there is no $HOME/.asoundrc file. Linux ALSA also, by default when using DMix unless further customized, resamples all audio to 48000hz. If this is not the case, or if you speculate customizations have been performed by your Linux distribution, you may need to read further below on how to ensure ALSA's DMix and DSnoop plugins are used with FlightGear & FGCom. The common side effect of possible customizations, FGCom does not playback (or record) sound.

(Reference Linux software audio mixing with FlightGear)

Check your Home-directory (“~/” or $HOME) for a file ".alsoftrc" (Remember that the “show hidden files” must be enabled!)

Copied over from FGCOM Testing or FGCOM Testing Wiki page.

If using Creative Labs' OpenAL library (or older OpenAL version)

Check if you are using the old Creative Labs OpenAL library (or old version) which uses the ".openalrc" configuration file. If so, you can put something like this within ".openalrc":

$HOME/.openalrc

(define devices '(alsa))
(define alsa-out-device "plug:dmix")
(device alsa-in-device "plug:dsnoop")

If using OpenAL Soft (or newer OpenAL version)

It is more likely users of more recent Linux distributions are using this newer OpenAL Soft package, instead of the previously mentioned older Create Labs' OpenAL. (Hence, the likely rational for renaming the default configuration file to something other than the more common previous naming format.)

Copy either the be /etc/openal/alsoft.conf, /usr/share/doc/openal-1.15.1-r2/alsoftrc.sample.bz2, or create a new $HOME/.alsoftrc file and insert the following:

format = AL_FORMAT_STEREO16
cf_level = 1
drivers = alsa
[alsa]
device = plug:dmix
capture = plug:dsnoop

[NOTE: format is now "sample-type = uint16", and cf_level would appear not needed for typical users, or only desired for headphone users.]

The system wide OpenAL-soft configuration file may be /etc/openal/alsoft.conf or similar. It usually contains comments describing all possible configuration options.

Linux ALSA Audiophiles avoiding Dmix

For audiophiles using Linux ALSA and with their custom $HOME/.asoundrc file preventing DMix usage, make sure you have both specified "device = plug:dmix" as well as "capture = plug:dsnoop". Per ALSA's page, "dsnoop is the equivalent of the dmix plugin, but for recording sound." Without specifying using dsnoop for the capture device alongside your $HOME/.asoundrc file preventing DMix usage, you will likely only get silence played back when usage FGCom. FGCom is not working at this point, as the sound device is likely still locked by your $HOME/.asoundrc file and only recording silence or playing back silence during the echo test!

Using ALSA Custom "plug:" Filters

The OpenAL Soft (or the newer version of OpenAL) $HOME/.alsoftrc file also accepts using other $HOME/.asoundrc "plug:" incanatations, such as sections containing Dmix - alsa.opensrc.org's "pcm.dmixs51" customization for using DMix with 5.1 Surround Sound, and called as:

$ aplay -D "plug:dmixs51" Some_PCM_WAV_File.wav 

$HOME/.alsoftrc

"device = plug:dmixs51"

Just remember to also uncomment layout_surround51, and note the likely fact FlightGear is still only using Stereo sound (or two channel audio) and is only set here for an example!

How to start FGCom builtin ?

  1. Start FlightGear
  2. Open the dialog located in "Multiplayer > FGCom Settings"
  3. Check the "Enable" checkbox
  4. Close the dialog

You can also use the command line if you prefer:

--enable-fgcom (equivalent to --prop:/sim/fgcom/enabled=true )
--disable-fgcom (equivalent to --prop:/sim/fgcom/enabled=false )

FGCom will be automatically enabled for your future sessions until you uncheck the "Enable" checkbox.

How to test your setup ?

In order to check that your microphone and speakers are correctly connected and functional you can test it with the following steps:

Activate Testing

  1. Start FlightGear (if not yet done of course)
  2. Open the dialog located in "Multiplayer > FGCom Settings"
  3. Check the "Enabled" checkbox (If not yet already done.)
  4. Check the "Display messages" checkbox. (Displays FGCom's messages within the FlightGear's console.)
  5. Check the "Echo test" checkbox. (Connects to frequency 910.0, for loopback testing of your microphone record/capture device.)

At this moment you should hear your own voice with a delay. If you can't hear your own voice it means your microphone or your speakers are wrongly set. To further check your "Echo test", see Live FGCom

Deactivate Testing

  1. Unckeck the "Echo test" checkbox, and/or other boxes as desired.
  2. Close the dialog

How to use FGCom builtin ?

Once you started FGCom from the How to start FGCom builtin procedure, you can simply use your radio stack like it done in real life.

When you want to talk you have to press Space. When the Space is pressed you can't hear other pilots.

You can switch between COM1 and COM2 by pressing Shift + Space

FGCom dialog

[NOTE: It maybe desireable to keep FGCom's Settings "Display messages" activated, to verify these FGCom related keys are working properly!]

Dialog details

The dialog located in "Multiplayer > FGCom Settings" provide some features described here:

  • Enable : you can check/uncheck this for enable/disable FGCom feature
  • Display messages : display FGCom transaction message for debug only
  • Test : check/uncheck this for testing server communication (Echo-Box)
  • Speaker volume : set speaker volume for FGCom built-in
  • Server > List : Select the server to be connected (immediat effect)

FGCom standalone

Installation

If FlightGear is installed:

The good news here is that if you have FlightGear installed on your computer you already have FGCom standalone !


If FlightGear is not installed:

If you haven't installed FlightGear on the computer where you want to use FGCom standalone you can simply download FGCom standalone with the following steps:

  1. Download FGCom standalone: Windows | Linux 32 bits | Linux 64 bits | Mac (take care to select the correct version for your computer !)
  2. Unzip the downloaded file
  3. That's all ! Of course you can place the "FGCom" folder where you want on your computer

On Linux, you have to setup the permission as "executable" for the files "run_fgcom.sh" and "test_fgcom.sh"

How to start FGCom standalone ?

If FlightGear is installed:

On Windows you have to execute FGCom located in your Start menu > FlightGear > Tools > FGCom

On Linux you have to execute FGCom located in your Application menu > Games > FGCom

On Mac you have to enable "Enable FGCOM in Multi Player mode" located in the tab "Network" of the Mac launcher


If FlightGear is not installed:

On Windows, in your unzipped "FGCom" folder, you have to execute (double clic on it) the file "run_fgcom.bat".

On Linux, in your unzipped "FGCom" folder, you have to execute (double clic on it) the file "run_fgcom.sh".

On Mac, in your unzipped "FGCom" folder, you have to execute (right-clic > open with > Terminal.app) the file "run_fgcom.command". After the first time you can simply double click on "run_fgcom.command".


In both case

Now a terminal has been opened and you should be able to see the following lines:

Successfully parsed commandline options
Loaded file [../share/flightgear/special_frequencies.txt].
Reading airports [../share/flightgear/positions.txt]
loaded 46927 entries
Initializing IAX client as guest:xxxxxxxxxxx@fgcom.flightgear.org

How to test your setup ?

If FlightGear is installed:

On Windows you have to execute FGCom located in your Start menu > FlightGear > Tools > FGCom-testing

On Linux you have to execute FGCom located in your Application menu > Games > FGCom-testing

On Mac FIXME: require to be implemented in Mac launcher


If FlightGear is not installed:

On Windows, in your unzipped "FGCom" folder, you have to execute (double clic on it) the file "test_fgcom.bat".

On Linux, in your unzipped "FGCom" folder, you have to execute (double clic on it) the file "test_fgcom.sh".

On Mac, in your unzipped "FGCom" folder, you have to execute (right-clic > open with > Terminal.app) the file "test_fgcom.command". After the first time you can simply double click on "test_fgcom.command".


In both case

Now you should be able to hear your own voice with a delay and see the following lines:

Successfully parsed commandline options
Loaded file [../share/flightgear/special_frequencies.txt].
Reading airports [../share/flightgear/positions.txt]
loaded 46927 entries
Initializing IAX client as guest:xxxxxxxxxxx@fgcom.flightgear.org
Originating an audio only call
Call 0 accepted
Echo Box - For testing FGCOM
Call 0 answered

In order to stop FGCom standalone you have to press Control + c

How to use FGCom standalone ?

Once you started FGCom from the How to start FGCom standalone procedure, you have to start FlightGear with the following option:

--generic=socket,out,2,127.0.0.1,16661,udp,fgcom

Now you have to leave FGCom standalone running and simply use FlightGear without taking care of FGCom standalone.

When you want to talk you have to press Space. When the Space is pressed you can't hear other pilots.

You can switch between COM1 and COM2 by pressing Shift + Space

You can control the sound volume with the slider "ATC" from the File > Sound configuration dialog (even if ATC is unchecked)

During your FlightGear session you should be able to see some lines in the FGCom standalone, it's totally normal, they are here to inform you about the state of FGCom standalone (when you are listening, talking, changing frequency, changing COM1/2...)

In order to stop FGCom standalone you have to press Control + c or simply close the window.

Options details

Starting FGCom standalone with "-h" argument will show you all available options.

IMPORTANT: Keep in mind that FGCom standalone works fine for a standard operating system without options at all ! Use them only if you know exactly what they do.

FAQ

How to add the --generic option for FGCom standalone ?

Since FlightGear 3.0 you can select "FGCom standalone" in the FlightGear Launcher > Advanced > Network section else:

On the last page of the FlightGear Launcher, press "Advanced" then select "Input/Output" item. Press "New" and set the fields as:

  • Protocol  : generic
  • Medium  : socket
  • Direction : out
  • Hz  : 5
  • Hostname  : 127.0.0.1
  • Port  : 16661
  • Select UDP
  • Generic  : fgcom

I want to use FGCom builtin but I haven't any item "Multiplayer > FGCom Settings" in FlightGear

Because you are not using FlightGear 3.0 or higher. FGCom builtin is only available for FlightGear 3.0 or higher. You have to use FGCom standalone until you upgrade your FlightGear installation.

I want to use FGCom standalone but I haven't any FGCom item in "Start menu > FlightGear > Tools"

Because you are not using FlightGear 3.0 or higher. FGCom standalone is automatically installed only for FlightGear 3.0 or higher.

You have to follow "If FlightGear is not installed" instructions until you upgrade your FlightGear installation.

I'm using FGCom standalone, other pilots can hear me but I can't hear other pilots

Be sure the slider "ATC" from the File > Sound configuration dialog is at full right.