Skip to content
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.

Commit

Permalink
fixed freeplay crash
Browse files Browse the repository at this point in the history
  • Loading branch information
Leather128 committed Nov 6, 2021
1 parent b95a713 commit 022de60
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions source/states/FreeplayState.hx
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,8 @@ class FreeplayState extends MusicBeatState
#if cpp
@:privateAccess
{
lime.media.openal.AL.sourcef(FlxG.sound.music._channel.__source.__backend.handle, lime.media.openal.AL.PITCH, curSpeed);
if(FlxG.sound.music.active && FlxG.sound.music.playing)
lime.media.openal.AL.sourcef(FlxG.sound.music._channel.__source.__backend.handle, lime.media.openal.AL.PITCH, curSpeed);

if (vocals.playing)
lime.media.openal.AL.sourcef(vocals._channel.__source.__backend.handle, lime.media.openal.AL.PITCH, curSpeed);
Expand All @@ -307,7 +308,8 @@ class FreeplayState extends MusicBeatState
#if cpp
@:privateAccess
{
lime.media.openal.AL.sourcef(FlxG.sound.music._channel.__source.__backend.handle, lime.media.openal.AL.PITCH, curSpeed);
if(FlxG.sound.music.active && FlxG.sound.music.playing)
lime.media.openal.AL.sourcef(FlxG.sound.music._channel.__source.__backend.handle, lime.media.openal.AL.PITCH, curSpeed);

if (vocals.playing)
lime.media.openal.AL.sourcef(vocals._channel.__source.__backend.handle, lime.media.openal.AL.PITCH, curSpeed);
Expand All @@ -322,7 +324,8 @@ class FreeplayState extends MusicBeatState
#if cpp
@:privateAccess
{
lime.media.openal.AL.sourcef(FlxG.sound.music._channel.__source.__backend.handle, lime.media.openal.AL.PITCH, curSpeed);
if(FlxG.sound.music.active && FlxG.sound.music.playing)
lime.media.openal.AL.sourcef(FlxG.sound.music._channel.__source.__backend.handle, lime.media.openal.AL.PITCH, curSpeed);

if (vocals.playing)
lime.media.openal.AL.sourcef(vocals._channel.__source.__backend.handle, lime.media.openal.AL.PITCH, curSpeed);
Expand Down

0 comments on commit 022de60

Please sign in to comment.