Busfahrer hintergrundmusik

This commit is contained in:
2026-09-13 15:40:50 +02:00
parent 471aadf272
commit cf90775bad
2 changed files with 30 additions and 3 deletions
+24 -1
View File
@@ -38,9 +38,32 @@ namespace Casino
public void PlayLoopingSound(byte[] audioBlob)
{
string tempFile = System.IO.Path.Combine(
System.IO.Path.GetTempPath(),
"background.mp3");
"Hintergrundmusik.mp3");
player.Volume = 0.1;
File.WriteAllBytes(tempFile, audioBlob);
player.Open(new Uri(tempFile));
player.MediaEnded -= Player_MediaEnded;
player.MediaEnded += Player_MediaEnded;
player.Play();
}
public void PlayLoopingSound_2(byte[] audioBlob)
{
string tempFile = System.IO.Path.Combine(
System.IO.Path.GetTempPath(),
"Hintergrundmusik_Bus.mp3");
player.Volume = 0.1;
File.WriteAllBytes(tempFile, audioBlob);