2004-05-14 16:21:11 +00:00
|
|
|
<?xml version="1.0"?>
|
|
|
|
|
|
|
|
<!-- Sound control dialog -->
|
|
|
|
|
|
|
|
<PropertyList>
|
2009-11-30 12:06:02 +00:00
|
|
|
<name>sound-dialog</name>
|
|
|
|
<modal>false</modal>
|
|
|
|
<width>400</width>
|
|
|
|
<layout>vbox</layout>
|
|
|
|
|
2010-12-27 20:19:31 +00:00
|
|
|
<group>
|
|
|
|
<layout>hbox</layout>
|
|
|
|
<empty><stretch>1</stretch></empty>
|
|
|
|
|
|
|
|
<text>
|
|
|
|
<label>Sound Configuration</label>
|
|
|
|
</text>
|
|
|
|
|
|
|
|
<empty><stretch>1</stretch></empty>
|
|
|
|
|
|
|
|
<button>
|
|
|
|
<pref-width>16</pref-width>
|
|
|
|
<pref-height>16</pref-height>
|
|
|
|
<legend></legend>
|
|
|
|
<keynum>27</keynum>
|
|
|
|
<border>2</border>
|
|
|
|
<binding>
|
|
|
|
<command>dialog-close</command>
|
|
|
|
</binding>
|
|
|
|
</button>
|
|
|
|
</group>
|
2009-11-30 12:06:02 +00:00
|
|
|
|
|
|
|
<hrule/>
|
|
|
|
|
|
|
|
<group>
|
|
|
|
<layout>hbox</layout>
|
2015-05-03 16:13:50 +00:00
|
|
|
|
|
|
|
<!-- gap -->
|
|
|
|
<text>
|
|
|
|
<label></label>
|
|
|
|
</text>
|
|
|
|
|
2009-12-13 18:06:54 +00:00
|
|
|
<text>
|
|
|
|
<halign>right</halign>
|
|
|
|
<label>Sound Device:</label>
|
|
|
|
</text>
|
|
|
|
|
|
|
|
<combo>
|
|
|
|
<name>source-selection</name>
|
|
|
|
<halign>fill</halign>
|
|
|
|
<stretch>true</stretch>
|
|
|
|
<property>sim/gui/dialogs/sound-dialog/source-selection</property>
|
|
|
|
<binding>
|
|
|
|
<command>dialog-apply</command>
|
|
|
|
<object-name>source-selection</object-name>
|
|
|
|
</binding>
|
|
|
|
<binding>
|
|
|
|
<command>dialog-update</command>
|
|
|
|
<object-name>sound-dialog</object-name>
|
|
|
|
</binding>
|
|
|
|
</combo>
|
2015-05-03 16:13:50 +00:00
|
|
|
|
|
|
|
<!-- gap -->
|
|
|
|
<text>
|
|
|
|
<label></label>
|
|
|
|
</text>
|
|
|
|
|
2009-12-13 18:06:54 +00:00
|
|
|
</group>
|
2009-11-30 12:06:02 +00:00
|
|
|
|
2009-12-13 18:06:54 +00:00
|
|
|
<hrule/>
|
2009-11-30 12:06:02 +00:00
|
|
|
|
2009-12-13 18:06:54 +00:00
|
|
|
<group>
|
|
|
|
<layout>table</layout>
|
|
|
|
<halign>center</halign>
|
|
|
|
|
|
|
|
<text>
|
|
|
|
<row>0</row>
|
|
|
|
<col>0</col>
|
|
|
|
<label>Channel</label>
|
|
|
|
<padding>10</padding>
|
|
|
|
</text>
|
2010-12-27 20:19:31 +00:00
|
|
|
|
2009-12-13 18:06:54 +00:00
|
|
|
<text>
|
|
|
|
<row>0</row>
|
|
|
|
<col>1</col>
|
|
|
|
<label>Enabled</label>
|
|
|
|
<padding>10</padding>
|
|
|
|
</text>
|
|
|
|
|
|
|
|
<text>
|
|
|
|
<row>0</row>
|
|
|
|
<col>2</col>
|
|
|
|
<label>Volume</label>
|
|
|
|
<padding>10</padding>
|
|
|
|
</text>
|
|
|
|
|
|
|
|
<text>
|
|
|
|
<row>0</row>
|
|
|
|
<col>3</col>
|
|
|
|
<label>External</label>
|
|
|
|
<padding>10</padding>
|
|
|
|
</text>
|
|
|
|
|
|
|
|
<text>
|
|
|
|
<row>1</row>
|
|
|
|
<col>0</col>
|
|
|
|
<label>Master</label>
|
|
|
|
<halign>left</halign>
|
|
|
|
</text>
|
|
|
|
|
|
|
|
<checkbox>
|
|
|
|
<row>1</row>
|
|
|
|
<col>1</col>
|
|
|
|
<property>/sim/sound/enabled</property>
|
|
|
|
<binding>
|
|
|
|
<command>dialog-apply</command>
|
|
|
|
</binding>
|
|
|
|
</checkbox>
|
2009-11-30 12:06:02 +00:00
|
|
|
|
2009-12-13 18:06:54 +00:00
|
|
|
<slider>
|
|
|
|
<row>1</row>
|
|
|
|
<col>2</col>
|
|
|
|
<property>/sim/sound/volume</property>
|
|
|
|
<binding>
|
|
|
|
<command>dialog-apply</command>
|
|
|
|
</binding>
|
|
|
|
</slider>
|
|
|
|
|
|
|
|
<text>
|
|
|
|
<row>2</row>
|
|
|
|
<col>0</col>
|
|
|
|
<label>Effects</label>
|
|
|
|
<halign>left</halign>
|
2010-12-15 12:43:09 +00:00
|
|
|
<enable>
|
|
|
|
<property>/sim/sound/enabled</property>
|
|
|
|
</enable>
|
2009-12-13 18:06:54 +00:00
|
|
|
</text>
|
|
|
|
|
|
|
|
<checkbox>
|
|
|
|
<row>2</row>
|
|
|
|
<col>1</col>
|
|
|
|
<property>/sim/sound/effects/enabled</property>
|
|
|
|
<binding>
|
|
|
|
<command>dialog-apply</command>
|
|
|
|
</binding>
|
2010-12-15 12:43:09 +00:00
|
|
|
<enable>
|
|
|
|
<property>/sim/sound/enabled</property>
|
|
|
|
</enable>
|
2009-12-13 18:06:54 +00:00
|
|
|
</checkbox>
|
2009-12-08 10:36:54 +00:00
|
|
|
|
2009-12-13 18:06:54 +00:00
|
|
|
<slider>
|
|
|
|
<row>2</row>
|
|
|
|
<col>2</col>
|
|
|
|
<property>/sim/sound/effects/volume</property>
|
|
|
|
<binding>
|
|
|
|
<command>dialog-apply</command>
|
|
|
|
</binding>
|
2010-12-15 12:43:09 +00:00
|
|
|
<enable>
|
|
|
|
<property>/sim/sound/enabled</property>
|
|
|
|
</enable>
|
2009-12-13 18:06:54 +00:00
|
|
|
</slider>
|
|
|
|
|
|
|
|
<text>
|
|
|
|
<row>3</row>
|
|
|
|
<col>0</col>
|
|
|
|
<label>Avionics</label>
|
|
|
|
<halign>left</halign>
|
2010-12-15 12:43:09 +00:00
|
|
|
<enable>
|
|
|
|
<property>/sim/sound/enabled</property>
|
|
|
|
</enable>
|
2009-12-13 18:06:54 +00:00
|
|
|
</text>
|
2010-12-27 20:19:31 +00:00
|
|
|
|
2009-12-13 18:06:54 +00:00
|
|
|
<checkbox>
|
2014-06-12 18:06:04 +00:00
|
|
|
<row>3</row>
|
2009-12-13 18:06:54 +00:00
|
|
|
<col>1</col>
|
|
|
|
<property>/sim/sound/avionics/enabled</property>
|
|
|
|
<binding>
|
|
|
|
<command>dialog-apply</command>
|
|
|
|
</binding>
|
2010-12-15 12:43:09 +00:00
|
|
|
<enable>
|
|
|
|
<property>/sim/sound/enabled</property>
|
|
|
|
</enable>
|
2009-12-13 18:06:54 +00:00
|
|
|
</checkbox>
|
2009-11-30 12:06:02 +00:00
|
|
|
|
2009-12-13 18:06:54 +00:00
|
|
|
<slider>
|
2014-06-12 18:06:04 +00:00
|
|
|
<row>3</row>
|
2009-12-13 18:06:54 +00:00
|
|
|
<col>2</col>
|
|
|
|
<property>/sim/sound/avionics/volume</property>
|
|
|
|
<binding>
|
|
|
|
<command>dialog-apply</command>
|
|
|
|
</binding>
|
2010-12-15 12:43:09 +00:00
|
|
|
<enable>
|
|
|
|
<property>/sim/sound/enabled</property>
|
|
|
|
</enable>
|
2009-12-13 18:06:54 +00:00
|
|
|
</slider>
|
2009-11-30 12:06:02 +00:00
|
|
|
|
2009-12-13 18:06:54 +00:00
|
|
|
<checkbox>
|
2014-06-12 18:06:04 +00:00
|
|
|
<row>3</row>
|
2009-12-13 18:06:54 +00:00
|
|
|
<col>3</col>
|
|
|
|
<property>/sim/sound/avionics/external-view</property>
|
|
|
|
<binding>
|
|
|
|
<command>dialog-apply</command>
|
|
|
|
</binding>
|
2010-12-15 12:43:09 +00:00
|
|
|
<enable>
|
|
|
|
<property>/sim/sound/enabled</property>
|
|
|
|
</enable>
|
2009-12-13 18:06:54 +00:00
|
|
|
</checkbox>
|
|
|
|
|
|
|
|
<text>
|
2014-06-12 18:06:04 +00:00
|
|
|
<row>4</row>
|
2009-12-13 18:06:54 +00:00
|
|
|
<col>0</col>
|
|
|
|
<label>ATC</label>
|
|
|
|
<halign>left</halign>
|
2010-12-15 12:43:09 +00:00
|
|
|
<enable>
|
|
|
|
<property>/sim/sound/enabled</property>
|
|
|
|
</enable>
|
2009-12-13 18:06:54 +00:00
|
|
|
</text>
|
2010-12-27 20:19:31 +00:00
|
|
|
|
2009-12-13 18:06:54 +00:00
|
|
|
<checkbox>
|
2014-06-12 18:06:04 +00:00
|
|
|
<row>4</row>
|
2009-12-13 18:06:54 +00:00
|
|
|
<col>1</col>
|
|
|
|
<property>/sim/sound/atc/enabled</property>
|
|
|
|
<binding>
|
|
|
|
<command>dialog-apply</command>
|
|
|
|
</binding>
|
2010-12-15 12:43:09 +00:00
|
|
|
<enable>
|
|
|
|
<property>/sim/sound/enabled</property>
|
|
|
|
</enable>
|
2009-12-13 18:06:54 +00:00
|
|
|
</checkbox>
|
2009-11-30 12:06:02 +00:00
|
|
|
|
2009-12-13 18:06:54 +00:00
|
|
|
<slider>
|
2014-06-12 18:06:04 +00:00
|
|
|
<row>4</row>
|
2009-12-13 18:06:54 +00:00
|
|
|
<col>2</col>
|
|
|
|
<property>/sim/sound/atc/volume</property>
|
|
|
|
<binding>
|
|
|
|
<command>dialog-apply</command>
|
|
|
|
</binding>
|
2010-12-15 12:43:09 +00:00
|
|
|
<enable>
|
|
|
|
<property>/sim/sound/enabled</property>
|
|
|
|
</enable>
|
2009-12-13 18:06:54 +00:00
|
|
|
</slider>
|
2009-11-30 12:06:02 +00:00
|
|
|
|
2009-12-13 18:06:54 +00:00
|
|
|
<checkbox>
|
2014-06-12 18:06:04 +00:00
|
|
|
<row>4</row>
|
2009-12-13 18:06:54 +00:00
|
|
|
<col>3</col>
|
|
|
|
<property>/sim/sound/atc/external-view</property>
|
|
|
|
<binding>
|
|
|
|
<command>dialog-apply</command>
|
|
|
|
</binding>
|
2010-12-15 12:43:09 +00:00
|
|
|
<enable>
|
|
|
|
<property>/sim/sound/enabled</property>
|
|
|
|
</enable>
|
2009-12-13 18:06:54 +00:00
|
|
|
</checkbox>
|
2011-12-09 22:51:35 +00:00
|
|
|
|
|
|
|
<text>
|
2014-06-12 18:06:04 +00:00
|
|
|
<row>5</row>
|
2011-12-09 22:51:35 +00:00
|
|
|
<col>0</col>
|
|
|
|
<label>AI/MP</label>
|
|
|
|
<halign>left</halign>
|
|
|
|
<enable>
|
|
|
|
<property>/sim/sound/enabled</property>
|
|
|
|
</enable>
|
|
|
|
</text>
|
|
|
|
|
|
|
|
<checkbox>
|
2014-06-12 18:06:04 +00:00
|
|
|
<row>5</row>
|
2011-12-09 22:51:35 +00:00
|
|
|
<col>1</col>
|
|
|
|
<property>/sim/sound/aimodels/enabled</property>
|
|
|
|
<binding>
|
|
|
|
<command>dialog-apply</command>
|
|
|
|
</binding>
|
|
|
|
<enable>
|
|
|
|
<property>/sim/sound/enabled</property>
|
|
|
|
</enable>
|
|
|
|
</checkbox>
|
2012-07-07 15:26:05 +00:00
|
|
|
|
|
|
|
<slider>
|
2014-06-12 18:06:04 +00:00
|
|
|
<row>5</row>
|
2012-07-07 15:26:05 +00:00
|
|
|
<col>2</col>
|
|
|
|
<property>/sim/sound/aimodels/volume</property>
|
|
|
|
<binding>
|
|
|
|
<command>dialog-apply</command>
|
|
|
|
</binding>
|
|
|
|
<enable>
|
|
|
|
<property>/sim/sound/enabled</property>
|
|
|
|
</enable>
|
|
|
|
</slider>
|
2009-11-30 12:06:02 +00:00
|
|
|
</group>
|
|
|
|
|
2009-12-13 18:06:54 +00:00
|
|
|
<hrule/>
|
|
|
|
|
2017-02-14 19:48:04 +00:00
|
|
|
<group>
|
|
|
|
<layout>hbox</layout>
|
|
|
|
|
|
|
|
<!-- gap -->
|
|
|
|
<text>
|
|
|
|
<label></label>
|
|
|
|
</text>
|
|
|
|
|
|
|
|
<text>
|
|
|
|
<halign>right</halign>
|
|
|
|
<label>Use voice synthesis for tutorials and comms (requires restart)</label>
|
|
|
|
</text>
|
|
|
|
|
|
|
|
<checkbox>
|
|
|
|
<property>/sim/sound/voices/enabled</property>
|
|
|
|
<binding>
|
|
|
|
<command>dialog-apply</command>
|
|
|
|
</binding>
|
|
|
|
<enable>
|
|
|
|
<property>/sim/sound/enabled</property>
|
|
|
|
</enable>
|
|
|
|
</checkbox>
|
|
|
|
|
|
|
|
<!-- gap -->
|
|
|
|
<text>
|
|
|
|
<label></label>
|
|
|
|
</text>
|
|
|
|
|
|
|
|
</group>
|
|
|
|
|
|
|
|
<hrule/>
|
|
|
|
|
2009-11-30 12:06:02 +00:00
|
|
|
<group>
|
|
|
|
<layout>hbox</layout>
|
|
|
|
<default-padding>10</default-padding>
|
2010-12-27 20:19:31 +00:00
|
|
|
|
2009-11-30 12:06:02 +00:00
|
|
|
<button>
|
2009-11-30 14:24:04 +00:00
|
|
|
<legend>Apply</legend>
|
|
|
|
<key>Enter</key>
|
|
|
|
<binding>
|
|
|
|
<command>nasal</command>
|
|
|
|
<script>apply()</script>
|
|
|
|
</binding>
|
2009-12-01 10:40:21 +00:00
|
|
|
<binding>
|
|
|
|
<command>dialog-apply</command>
|
|
|
|
</binding>
|
|
|
|
</button>
|
|
|
|
|
|
|
|
<button>
|
|
|
|
<legend>Close</legend>
|
|
|
|
<default>true</default>
|
|
|
|
<key>Esc</key>
|
2009-11-30 12:06:02 +00:00
|
|
|
<binding>
|
|
|
|
<command>dialog-close</command>
|
|
|
|
</binding>
|
|
|
|
</button>
|
|
|
|
</group>
|
|
|
|
|
|
|
|
<nasal>
|
|
|
|
<open><![CDATA[
|
|
|
|
var dlg_root = cmdarg();
|
|
|
|
|
2009-12-13 18:06:54 +00:00
|
|
|
# Fill the sound device combo box
|
2012-03-24 11:45:58 +00:00
|
|
|
var combo = gui.findElementByName( dlg_root, "source-selection" );
|
2009-12-01 10:40:21 +00:00
|
|
|
var wsn = props.globals.getNode( "sim/sound/devices" );
|
2009-11-30 12:06:02 +00:00
|
|
|
if( wsn != nil ) {
|
|
|
|
var devices = wsn.getChildren("device");
|
|
|
|
forindex (var i; devices )
|
|
|
|
combo.getChild("value", i, 1).setValue(devices[i].getValue());
|
|
|
|
}
|
2009-11-30 14:24:04 +00:00
|
|
|
|
|
|
|
var apply = func {
|
2009-12-01 10:40:21 +00:00
|
|
|
var new = getprop("sim/gui/dialogs/sound-dialog/source-selection");
|
|
|
|
var current = getprop("sim/sound/device-name");
|
|
|
|
if (cmp(current, new) != 0) {
|
|
|
|
setprop("sim/sound/devices/name", new);
|
|
|
|
setprop("sim/sound/device-name", new);
|
2013-08-22 15:06:04 +00:00
|
|
|
if(getprop("/sim/fgcom/enabled")) {
|
|
|
|
setprop("/sim/fgcom/enabled", 0);
|
|
|
|
settimer( func { fgcommand("reinit", props.Node.new({ "subsystem" : "sound" })); }, 0.5 );
|
2013-08-24 16:58:40 +00:00
|
|
|
settimer( func { setprop("/sim/fgcom/enabled", 1); }, 1 );
|
2013-08-22 15:06:04 +00:00
|
|
|
} else {
|
|
|
|
fgcommand("reinit", props.Node.new({ "subsystem" : "sound" }));
|
|
|
|
}
|
2009-12-01 10:40:21 +00:00
|
|
|
}
|
2009-11-30 14:24:04 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
# initialization
|
2009-12-01 10:40:21 +00:00
|
|
|
var default_device = getprop("sim/sound/device-name");
|
2009-11-30 14:24:04 +00:00
|
|
|
setprop( "sim/gui/dialogs/sound-dialog/source-selection", default_device);
|
|
|
|
|
2009-11-30 12:06:02 +00:00
|
|
|
]]></open>
|
|
|
|
</nasal>
|
2004-05-14 16:21:11 +00:00
|
|
|
|
|
|
|
</PropertyList>
|