Win sounds für slots eingebaut
This commit is contained in:
@@ -12,8 +12,9 @@ namespace Casino
|
||||
class Audioplayer
|
||||
{
|
||||
private readonly MediaPlayer player = new MediaPlayer();
|
||||
private readonly MediaPlayer shortplayer = new MediaPlayer();
|
||||
|
||||
public Audioplayer() { player.MediaEnded += Player_MediaEnded; }
|
||||
public Audioplayer() { shortplayer.MediaEnded += Player_MediaEnded; }
|
||||
|
||||
public void PlaySound(byte[] audioBlob)
|
||||
{
|
||||
@@ -25,8 +26,8 @@ namespace Casino
|
||||
|
||||
File.WriteAllBytes(tempFile, audioBlob);
|
||||
|
||||
player.Open(new Uri(tempFile));
|
||||
player.Play();
|
||||
shortplayer.Open(new Uri(tempFile));
|
||||
shortplayer.Play();
|
||||
}
|
||||
|
||||
private void Player_MediaEnded(object? sender, EventArgs e)
|
||||
|
||||
Reference in New Issue
Block a user