diff --git a/Builds/MacOSX/OpenEphys.xcworkspace/xcshareddata/xcschemes/All.xcscheme b/Builds/MacOSX/OpenEphys.xcworkspace/xcshareddata/xcschemes/All.xcscheme
index ef6878cd8ba0a42fc4bca3eb352f11b803bac84c..3f65cd125c2378b2e3add17ffb7fa0e54cd1a06e 100644
--- a/Builds/MacOSX/OpenEphys.xcworkspace/xcshareddata/xcschemes/All.xcscheme
+++ b/Builds/MacOSX/OpenEphys.xcworkspace/xcshareddata/xcschemes/All.xcscheme
@@ -1,10 +1,29 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <Scheme
    LastUpgradeVersion = "0720"
-   version = "1.3">
+   version = "1.7">
    <BuildAction
       parallelizeBuildables = "YES"
       buildImplicitDependencies = "YES">
+      <PreActions>
+         <ExecutionAction
+            ActionType = "Xcode.IDEStandardExecutionActionsCore.ExecutionActionType.ShellScriptAction">
+            <ActionContent
+               title = "Run Script"
+               scriptText = "#!/bin/bash&#10;cd $PROJECT_DIR/Plugins/Config&#10;if [[ ! -a Env.xcconfig ]]&#10;then&#10;touch Env.xcconfig&#10;fi"
+               shellToInvoke = "/bin/bash">
+               <EnvironmentBuildable>
+                  <BuildableReference
+                     BuildableIdentifier = "primary"
+                     BlueprintIdentifier = "62F40A2101C1715EE4F8C87B"
+                     BuildableName = "open-ephys.app"
+                     BlueprintName = "open-ephys (App)"
+                     ReferencedContainer = "container:open-ephys.xcodeproj">
+                  </BuildableReference>
+               </EnvironmentBuildable>
+            </ActionContent>
+         </ExecutionAction>
+      </PreActions>
       <BuildActionEntries>
          <BuildActionEntry
             buildForTesting = "YES"
diff --git a/Builds/MacOSX/Plugins/Config/Plugin.xcconfig b/Builds/MacOSX/Plugins/Config/Plugin.xcconfig
index cdf718b90b8baac95ff3109e92d2f8dcad4b5358..a89db7a4d36ce2c2db5e7ee151b415445ac5aff2 100644
--- a/Builds/MacOSX/Plugins/Config/Plugin.xcconfig
+++ b/Builds/MacOSX/Plugins/Config/Plugin.xcconfig
@@ -1,6 +1,30 @@
-#include "Base.xcconfig"
+// Defaults for values that might be overridden in Env.xcconfig
+JULIA_PATH = /Applications/Julia-0.5.app/Contents/Resources/julia
+MAC_PACKAGE_DIR = /opt/local
+
+// Pull in machine-specific settings from git-ignored file, if it exists.
+#include "Env.xcconfig"
 
 CONFIGURATION_BUILD_DIR = $(PROJECT_DIR)/../../build/$(CONFIGURATION)/open-ephys.app/Contents/PlugIns
-HEADER_SEARCH_PATHS = ../../../../JuceLibraryCode ../../../../JuceLibraryCode/modules ../../../../Source/Plugins/Headers ../../../../Source/Plugins/CommonLibs $(inherited)
+COPY_PHASE_STRIP = NO
+DEBUG_INFORMATION_FORMAT = dwarf
+ENABLE_STRICT_OBJC_MSGSEND = YES
+GCC_C_LANGUAGE_STANDARD = c99
+GCC_GENERATE_DEBUGGING_SYMBOLS = YES
+GCC_NO_COMMON_BLOCKS = YES
+GCC_OPTIMIZATION_LEVEL = 3
+GCC_PREPROCESSOR_DEFINITIONS = $(inherited) OEPLUGIN JUCER_XCODE_MAC_F6D2F4CF=1 JUCE_APP_VERSION=0.4.1 JUCE_APP_VERSION_HEX=0x401
+GCC_VERSION = com.apple.compilers.llvm.clang.1_0
+GCC_WARN_64_TO_32_BIT_CONVERSION = NO
+GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR
+GCC_WARN_CHECK_SWITCH_STATEMENTS = YES
+GCC_WARN_MISSING_PARENTHESES = YES
+GCC_WARN_NON_VIRTUAL_DESTRUCTOR = YES
+GCC_WARN_TYPECHECK_CALLS_TO_PRINTF = YES
+GCC_WARN_UNDECLARED_SELECTOR = YES
+GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE
+GCC_WARN_UNUSED_FUNCTION = YES
+GCC_WARN_UNUSED_VARIABLE = YES
+HEADER_SEARCH_PATHS = ../../../../JuceLibraryCode ../../../../JuceLibraryCode/modules ../../../../Source/Plugins/Headers ../../../../Source/Plugins/CommonLibs $(MAC_PACKAGE_DIR)/include $(inherited)
 INSTALL_PATH = $(HOME)/Applications/open-ephys.app/Contents/PlugIns
 WRAPPER_EXTENSION = bundle
diff --git a/Builds/MacOSX/open-ephys.xcodeproj/xcshareddata/xcschemes/open-ephys (App).xcscheme b/Builds/MacOSX/open-ephys.xcodeproj/xcshareddata/xcschemes/open-ephys (App).xcscheme
new file mode 100644
index 0000000000000000000000000000000000000000..262fefb58e7a614eef6428e69017f34ee3e519e5
--- /dev/null
+++ b/Builds/MacOSX/open-ephys.xcodeproj/xcshareddata/xcschemes/open-ephys (App).xcscheme	
@@ -0,0 +1,110 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Scheme
+   LastUpgradeVersion = "0730"
+   version = "1.7">
+   <BuildAction
+      parallelizeBuildables = "YES"
+      buildImplicitDependencies = "YES">
+      <PreActions>
+         <ExecutionAction
+            ActionType = "Xcode.IDEStandardExecutionActionsCore.ExecutionActionType.ShellScriptAction">
+            <ActionContent
+               title = "Run Script"
+               scriptText = "#!/bin/bash&#10;cd $PROJECT_DIR/Plugins/Config&#10;if [[ ! -a Env.xcconfig ]]&#10;then&#10;touch Env.xcconfig&#10;fi"
+               shellToInvoke = "/bin/bash">
+               <EnvironmentBuildable>
+                  <BuildableReference
+                     BuildableIdentifier = "primary"
+                     BlueprintIdentifier = "62F40A2101C1715EE4F8C87B"
+                     BuildableName = "open-ephys.app"
+                     BlueprintName = "open-ephys (App)"
+                     ReferencedContainer = "container:open-ephys.xcodeproj">
+                  </BuildableReference>
+               </EnvironmentBuildable>
+            </ActionContent>
+         </ExecutionAction>
+      </PreActions>
+      <BuildActionEntries>
+         <BuildActionEntry
+            buildForTesting = "YES"
+            buildForRunning = "YES"
+            buildForProfiling = "YES"
+            buildForArchiving = "YES"
+            buildForAnalyzing = "YES">
+            <BuildableReference
+               BuildableIdentifier = "primary"
+               BlueprintIdentifier = "62F40A2101C1715EE4F8C87B"
+               BuildableName = "open-ephys.app"
+               BlueprintName = "open-ephys (App)"
+               ReferencedContainer = "container:open-ephys.xcodeproj">
+            </BuildableReference>
+         </BuildActionEntry>
+      </BuildActionEntries>
+   </BuildAction>
+   <TestAction
+      buildConfiguration = "Debug"
+      selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
+      selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
+      shouldUseLaunchSchemeArgsEnv = "YES">
+      <Testables>
+      </Testables>
+      <MacroExpansion>
+         <BuildableReference
+            BuildableIdentifier = "primary"
+            BlueprintIdentifier = "62F40A2101C1715EE4F8C87B"
+            BuildableName = "open-ephys.app"
+            BlueprintName = "open-ephys (App)"
+            ReferencedContainer = "container:open-ephys.xcodeproj">
+         </BuildableReference>
+      </MacroExpansion>
+      <AdditionalOptions>
+      </AdditionalOptions>
+   </TestAction>
+   <LaunchAction
+      buildConfiguration = "Debug"
+      selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
+      selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
+      launchStyle = "0"
+      useCustomWorkingDirectory = "NO"
+      ignoresPersistentStateOnLaunch = "NO"
+      debugDocumentVersioning = "YES"
+      debugServiceExtension = "internal"
+      allowLocationSimulation = "YES">
+      <BuildableProductRunnable
+         runnableDebuggingMode = "0">
+         <BuildableReference
+            BuildableIdentifier = "primary"
+            BlueprintIdentifier = "62F40A2101C1715EE4F8C87B"
+            BuildableName = "open-ephys.app"
+            BlueprintName = "open-ephys (App)"
+            ReferencedContainer = "container:open-ephys.xcodeproj">
+         </BuildableReference>
+      </BuildableProductRunnable>
+      <AdditionalOptions>
+      </AdditionalOptions>
+   </LaunchAction>
+   <ProfileAction
+      buildConfiguration = "Release"
+      shouldUseLaunchSchemeArgsEnv = "YES"
+      savedToolIdentifier = ""
+      useCustomWorkingDirectory = "NO"
+      debugDocumentVersioning = "YES">
+      <BuildableProductRunnable
+         runnableDebuggingMode = "0">
+         <BuildableReference
+            BuildableIdentifier = "primary"
+            BlueprintIdentifier = "62F40A2101C1715EE4F8C87B"
+            BuildableName = "open-ephys.app"
+            BlueprintName = "open-ephys (App)"
+            ReferencedContainer = "container:open-ephys.xcodeproj">
+         </BuildableReference>
+      </BuildableProductRunnable>
+   </ProfileAction>
+   <AnalyzeAction
+      buildConfiguration = "Debug">
+   </AnalyzeAction>
+   <ArchiveAction
+      buildConfiguration = "Release"
+      revealArchiveInOrganizer = "YES">
+   </ArchiveAction>
+</Scheme>
diff --git a/Source/Processors/DataThreads/RhythmNode/RHD2000Editor.cpp b/Source/Processors/DataThreads/RhythmNode/RHD2000Editor.cpp
index 840f071721585ef57631f8d47b3fa486af518782..24c2926f4380ed6d13049e575cad2d2458353fd5 100644
--- a/Source/Processors/DataThreads/RhythmNode/RHD2000Editor.cpp
+++ b/Source/Processors/DataThreads/RhythmNode/RHD2000Editor.cpp
@@ -871,13 +871,14 @@ void RHD2000Editor::buttonEvent(Button* button)
 
 void RHD2000Editor::channelChanged (int channel, bool /*newState*/)
 {
+    // Audio output is tied to DAC channels 0 and 1
     for (int i = 0; i < 2; i++)
     {
         if (electrodeButtons[i]->getToggleState())
         {
             electrodeButtons[i]->setChannelNum (channel);
             electrodeButtons[i]->repaint();
-            board->setDACchannel (i, channel);
+            board->setDACchannel (i, channel - 1); // HW channels are zero-based
         }
     }
 }
diff --git a/Source/Processors/DataThreads/RhythmNode/RHD2000Thread.cpp b/Source/Processors/DataThreads/RhythmNode/RHD2000Thread.cpp
index 0008761ac992aaa76ccf49000f6feee09dae0355..2ccaad9e3d46524b589cb8e38120eeff371c9581 100644
--- a/Source/Processors/DataThreads/RhythmNode/RHD2000Thread.cpp
+++ b/Source/Processors/DataThreads/RhythmNode/RHD2000Thread.cpp
@@ -221,7 +221,7 @@ void RHD2000Thread::setDACchannel(int dacOutput, int channel)
             {
                 dacChannels[dacOutput] = channel - channelCount;
                 dacStream[dacOutput] = i;
-				break;
+                break;
             }
             else
             {
@@ -1582,7 +1582,7 @@ bool RHD2000Thread::updateBuffer()
 
     }
 
-	
+
     if (dacOutputShouldChange)
     {
 		std::cout << "DAC" << std::endl;