From 55b844ed6a9ed0ebff4c178abe6eb61e5c93c064 Mon Sep 17 00:00:00 2001 From: ZappoMan Date: Sun, 23 Mar 2014 11:27:06 -0700 Subject: [PATCH] add sample scripts --- examples/audioDeviceExample.js | 22 ++++++++++++++++++++++ examples/settingsExample.js | 18 ++++++++++++++++++ 2 files changed, 40 insertions(+) create mode 100644 examples/audioDeviceExample.js create mode 100644 examples/settingsExample.js 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