mirror of
https://github.com/Ale32bit/Capy64.git
synced 2025-01-18 10:36:44 +00:00
Stop audio on close
This commit is contained in:
parent
d318523bde
commit
5dddc42910
1 changed files with 6 additions and 0 deletions
|
@ -14,6 +14,7 @@ public class Audio : IPlugin
|
|||
public Audio(IGame game)
|
||||
{
|
||||
_game = game;
|
||||
_game.EventEmitter.OnClose += OnClose;
|
||||
}
|
||||
|
||||
private static LuaRegister[] AudioLib = new LuaRegister[]
|
||||
|
@ -214,4 +215,9 @@ public class Audio : IPlugin
|
|||
|
||||
return 1;
|
||||
}
|
||||
|
||||
private void OnClose(object sender, EventArgs e)
|
||||
{
|
||||
_game.Audio.Sound.Stop(true);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue