Busfahrer hintergrundmusik
This commit is contained in:
+24
-1
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user