diff --git a/examples/audioDeviceExample.js b/examples/audioDeviceExample.js new file mode 100644 index 0000000000..2565e17524 --- /dev/null +++ b/examples/audioDeviceExample.js @@ -0,0 +1,22 @@ +// +// audioDeviceExample.js +// hifi +// +// Created by Brad Hefta-Gaub on 3/22/14 +// Copyright (c) 2013 HighFidelity, Inc. All rights reserved. +// +// This is an example script that demonstrates use of the Menu object +// + + + + +print("Audio Input Device: " + AudioDevice.getInputDevice()); +AudioDevice.setInputDevice("Shure Digital"); +print("Audio Input Device: " + AudioDevice.getInputDevice()); + +print("Audio Output Device: " + AudioDevice.getOutputDevice()); +AudioDevice.setOutputDevice("Shure Digital"); +print("Audio Output Device: " + AudioDevice.getOutputDevice()); + +Script.stop(); \ No newline at end of file diff --git a/examples/settingsExample.js b/examples/settingsExample.js new file mode 100644 index 0000000000..0dcc5482b6 --- /dev/null +++ b/examples/settingsExample.js @@ -0,0 +1,18 @@ +// +// settingsExample.js +// hifi +// +// Created by Brad Hefta-Gaub on 3/22/14 +// Copyright (c) 2013 HighFidelity, Inc. All rights reserved. +// +// This is an example script that demonstrates use of the Menu object +// + + + + +print("mySetting: " + Settings.getValue("mySetting")); +Settings.setValue("mySetting", "spam"); +print("mySetting: " + Settings.getValue("mySetting")); + +Script.stop(); \ No newline at end of file