aboutsummaryrefslogtreecommitdiff
path: root/TimeHACK.Main/OS/Win95/Win95Apps
diff options
context:
space:
mode:
authorAShifter <[email protected]>2017-06-11 08:28:32 -0600
committerAShifter <[email protected]>2017-06-11 08:28:32 -0600
commitab67708a62bdf12342de779ca3214e0862aa1e92 (patch)
treed882272d4782af1b96c275bc4d5e90003fc70e96 /TimeHACK.Main/OS/Win95/Win95Apps
parent66ad623c598d689e7593a1c88a07430d2de7a630 (diff)
downloadhistacom2-ab67708a62bdf12342de779ca3214e0862aa1e92.tar.gz
histacom2-ab67708a62bdf12342de779ca3214e0862aa1e92.tar.bz2
histacom2-ab67708a62bdf12342de779ca3214e0862aa1e92.zip
Fix dial-up sound bug
Play the sound on a different thread, and BAM IT WORKS WOW YOY and also link the threads so the main thread waits for the sound thread to end something like that just look at Hack1.cs
Diffstat (limited to 'TimeHACK.Main/OS/Win95/Win95Apps')
-rw-r--r--TimeHACK.Main/OS/Win95/Win95Apps/Story/Hack1.cs21
1 files changed, 9 insertions, 12 deletions
diff --git a/TimeHACK.Main/OS/Win95/Win95Apps/Story/Hack1.cs b/TimeHACK.Main/OS/Win95/Win95Apps/Story/Hack1.cs
index 4f12ec7..4a2c988 100644
--- a/TimeHACK.Main/OS/Win95/Win95Apps/Story/Hack1.cs
+++ b/TimeHACK.Main/OS/Win95/Win95Apps/Story/Hack1.cs
@@ -23,25 +23,22 @@ namespace TimeHACK.OS.Win95.Win95Apps.Story
{
wm.startWin95(term, "MS-DOS Prompt", null, true, true);
-
- Thread theThread = new Thread(startObjectMAIN);
-
- theThread.Start();
+ term.WriteLine("192.168.0.1 Connecting...");
+ Thread soundThread = new Thread(dialup_sound_play);
+ soundThread.Start();
+ soundThread.Join();
+ term.WriteLine("192.168.0.1 Connected.");
}
- public void startObjectMAIN()
+ public void dialup_sound_play()
{
- SoundPlayer startsound;
- term.WriteLine("192.168.0.1 Connecting...");
+ SoundPlayer dialup_sound;
// Play Dial-up Sound
Stream audio = Properties.Resources.modem_dial;
- startsound = new SoundPlayer(audio);
- startsound.Play();
- Thread.Sleep(5000);
- startsound.Stop();
- term.WriteLine("192.168.0.1 Connected.");
+ dialup_sound = new SoundPlayer(audio);
+ dialup_sound.PlaySync();
}
}
}