From caa7feff1c3732c99d0ddac506c2f99b81ed710f Mon Sep 17 00:00:00 2001 From: player-03 Date: Mon, 29 Mar 2021 05:48:41 -0400 Subject: [PATCH] Reword comment for clarity (Also for grammar and consistent line length.) --- src/lime/_internal/backend/native/NativeAudioSource.hx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/lime/_internal/backend/native/NativeAudioSource.hx b/src/lime/_internal/backend/native/NativeAudioSource.hx index 16bf1dcdc..ca5c98e38 100644 --- a/src/lime/_internal/backend/native/NativeAudioSource.hx +++ b/src/lime/_internal/backend/native/NativeAudioSource.hx @@ -294,9 +294,10 @@ class NativeAudioSource AL.sourceQueueBuffers(handle, numBuffers, buffers); - // If openAL runs out of buffer it will stop playback. - // This check is here to recover from this and resume playback - // this situation typically happens when resizing window or other operations that freezes the main thread + // OpenAL can unexpectedly stop playback if the buffers fill up, + // which typically happens if an operation (such as resizing a + // window) freezes the main thread. + // If AL is supposed to be playing but isn't, restart it here. if (playing && handle != null && AL.getSourcei(handle, AL.SOURCE_STATE) == AL.STOPPED){ AL.sourcePlay(handle); }