diff options
author | Phil Burk <[email protected]> | 2016-08-09 19:16:23 -0700 |
---|---|---|
committer | Phil Burk <[email protected]> | 2016-08-09 19:16:23 -0700 |
commit | e83baf9bf34cc41097e7f38f16dee0df2f80554a (patch) | |
tree | d8ed90f9edeea55903c6f5fd8ca9ecf8c6676791 /src/com/jsyn/devices/javasound | |
parent | eb36cf83f1cca79e76c4ad44fc78077c9428790b (diff) |
Fix race condition when stopping and restarting the synthesizer.
https://github.com/philburk/jsyn/issues/30
Diffstat (limited to 'src/com/jsyn/devices/javasound')
-rw-r--r-- | src/com/jsyn/devices/javasound/JavaSoundAudioDevice.java | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/src/com/jsyn/devices/javasound/JavaSoundAudioDevice.java b/src/com/jsyn/devices/javasound/JavaSoundAudioDevice.java index 56b3912..656dc1c 100644 --- a/src/com/jsyn/devices/javasound/JavaSoundAudioDevice.java +++ b/src/com/jsyn/devices/javasound/JavaSoundAudioDevice.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -34,7 +34,7 @@ import com.jsyn.devices.AudioDeviceOutputStream; /** * Use JavaSound to access the audio hardware. - * + * * @author Phil Burk (C) 2009 Mobileer Inc */ public class JavaSoundAudioDevice implements AudioDeviceManager { @@ -229,9 +229,6 @@ public class JavaSoundAudioDevice implements AudioDeviceManager { bytes[byteIndex++] = (byte) (sample >> 8); // big end } - // sleepUntilNonBlocking( byteIndex ); // This was just an attempt to get rid of clicks - // on Apple. - line.write(bytes, 0, byteIndex); } |