--- old/src/java.desktop/share/classes/com/sun/media/sound/DirectAudioDevice.java 2017-07-05 11:03:52.000000000 -0700 +++ new/src/java.desktop/share/classes/com/sun/media/sound/DirectAudioDevice.java 2017-07-05 11:03:52.000000000 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2002, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -1351,18 +1351,14 @@ // pre-empted while another thread changes doIO and notifies, // before we wait (so we sleep in wait forever). synchronized(lock) { - if (!doIO) { + while (!doIO && thread == curThread) { try { lock.wait(); - } catch(InterruptedException ie) { - } finally { - if (thread != curThread) { - break; - } + } catch (InterruptedException ignored) { } } } - while (doIO) { + while (doIO && thread == curThread) { if (newFramePosition >= 0) { clipBytePosition = newFramePosition * frameSize; newFramePosition = -1;