Commit a7527401 authored by Florian's avatar Florian

Fixed audio track being released twice

parent 2ba56883
......@@ -322,8 +322,13 @@ public class NoiseGenerator {
}
public void setGeneratedPlayerToNull(){
generatedWhitenoisePlayer.release(); //release the player resources
audioTrack.release(); //release the player resources
if(generatedWhitenoisePlayer!=null){
generatedWhitenoisePlayer.release();
} //release the player resources
/*if(audioTrack!=null){
audioTrack.release();
} //release the player resources
*/
generatedWhitenoisePlayer = null; //set the player to null
audioTrack = null; //set the player to null
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment