Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

- SoLoud Update #183

Open
wants to merge 1 commit into
base: UET_DEV
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion Game.bb
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ Local InitErrorStr$ = ""
Global ErrorMessageInitialized% = False

If FileSize("BlitzToolbox.dll") = 0 Then InitErrorStr = InitErrorStr + "BlitzToolbox.dll" + Chr(13) + Chr(10)
If FileSize("FMod.dll") = 0 Then InitErrorStr = InitErrorStr + "FMod.dll" + Chr(13) + Chr(10)
If FileSize("dplayx.dll") = 0 Then InitErrorStr = InitErrorStr + "dplayx.dll" + Chr(13) + Chr(10)
If FileSize("d3dim700.dll") = 0 Then InitErrorStr = InitErrorStr + "d3dim700.dll" + Chr(13) + Chr(10) ; ~ Optional in fact
If FileSize("FreeImage.dll") = 0 Then InitErrorStr = InitErrorStr + "FreeImage.dll" + Chr(13) + Chr(10)
Expand Down
12 changes: 6 additions & 6 deletions Source Code/Events_Core.bb
Original file line number Diff line number Diff line change
Expand Up @@ -1044,7 +1044,7 @@ Function UpdateEvents%()
GiveAchievement("079")

If e\SoundCHN <> 0 Then StopStream_Strict(e\SoundCHN) : e\SoundCHN = 0 : e\SoundCHN_IsStream = False
e\SoundCHN = StreamSound_Strict("SFX\SCP\079\Speech.ogg", opt\VoiceVolume * opt\MasterVolume, 0)
e\SoundCHN = StreamSound_Strict("SFX\SCP\079\Speech.ogg", opt\VoiceVolume * opt\MasterVolume, False)
e\SoundCHN_IsStream = True

e\EventState = 2.0
Expand All @@ -1055,7 +1055,7 @@ Function UpdateEvents%()
If e\EventState > 5000.0
If EntityDistanceSquared(e\room\Objects[0], me\Collider) < 6.25
If e\SoundCHN <> 0 Then StopStream_Strict(e\SoundCHN) : e\SoundCHN = 0 : e\SoundCHN_IsStream = False
e\SoundCHN = StreamSound_Strict("SFX\SCP\079\Refuse.ogg", opt\VoiceVolume * opt\MasterVolume, 0)
e\SoundCHN = StreamSound_Strict("SFX\SCP\079\Refuse.ogg", opt\VoiceVolume * opt\MasterVolume, False)
e\SoundCHN_IsStream = True

e\EventState = 1.5
Expand Down Expand Up @@ -1092,7 +1092,7 @@ Function UpdateEvents%()
If e\EventState2 = 1.0
If RemoteDoorOn
If e\SoundCHN <> 0 Then StopStream_Strict(e\SoundCHN) : e\SoundCHN = 0 : e\SoundCHN_IsStream = False
e\SoundCHN = StreamSound_Strict("SFX\SCP\079\GateB.ogg", opt\VoiceVolume * opt\MasterVolume, 0)
e\SoundCHN = StreamSound_Strict("SFX\SCP\079\GateB.ogg", opt\VoiceVolume * opt\MasterVolume, False)
e\SoundCHN_IsStream = True

For e2.Events = Each Events
Expand Down Expand Up @@ -9472,7 +9472,7 @@ Function UpdateEndings%()
e\room\NPC[0]\State = 3.0

RemoveNPC(e\room\NPC[1])
e\SoundCHN = StreamSound_Strict("SFX\Ending\GateB\682Battle.ogg", opt\VoiceVolume * opt\MasterVolume, 0)
e\SoundCHN = StreamSound_Strict("SFX\Ending\GateB\682Battle.ogg", opt\VoiceVolume * opt\MasterVolume, False)
e\SoundCHN_IsStream = True

e\EventState = 2.0
Expand Down Expand Up @@ -9523,7 +9523,7 @@ Function UpdateEndings%()
ElseIf e\EventState > 70.0 * 35.0 And e\EventState < 70.0 * 36.5
me\CameraShake = 1.5
If e\EventState - fps\Factor[0] <= 70.0 * 35.0
e\SoundCHN = StreamSound_Strict("SFX\Ending\GateB\DetonatingAlphaWarheads.ogg", opt\VoiceVolume * opt\MasterVolume, 0)
e\SoundCHN = StreamSound_Strict("SFX\Ending\GateB\DetonatingAlphaWarheads.ogg", opt\VoiceVolume * opt\MasterVolume, False)
e\SoundCHN_IsStream = True
EndIf
ElseIf e\EventState > 70.0 * 39.5 And e\EventState < 70.0 * 39.8
Expand Down Expand Up @@ -9568,7 +9568,7 @@ Function UpdateEndings%()
Else
SelectedItem = Null

e\SoundCHN2 = StreamSound_Strict("SFX\Ending\GateB\AlphaWarheadsFail.ogg", opt\VoiceVolume * opt\MasterVolume, 0)
e\SoundCHN2 = StreamSound_Strict("SFX\Ending\GateB\AlphaWarheadsFail.ogg", opt\VoiceVolume * opt\MasterVolume, False)
e\SoundCHN2_IsStream = True

n.NPCs = CreateNPC(NPCTypeMTF, EntityX(e\room\Objects[8], True), EntityY(e\room\Objects[8], True) + 0.29, EntityZ(e\room\Objects[8], True))
Expand Down
2 changes: 1 addition & 1 deletion Source Code/Graphics_Core.bb
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ Function PlayMovie%(MoviePath$)
Local i%, SkipMessage$
Local MovieFile$ = "GFX\Menu\" + MoviePath
Local Movie% = OpenMovie_Strict(MovieFile + ".wmv")
Local SplashScreenAudio% = StreamSound_Strict(MovieFile + ".ogg", opt\SFXVolume * opt\MasterVolume, 0)
Local SplashScreenAudio% = StreamSound_Strict(MovieFile + ".ogg", opt\SFXVolume * opt\MasterVolume, False)

Repeat
Cls()
Expand Down
2 changes: 1 addition & 1 deletion Source Code/Loading_Core.bb
Original file line number Diff line number Diff line change
Expand Up @@ -1369,7 +1369,7 @@ Music[33] = "860_1_Red"
;[End Block]

Global MusicCHN%
MusicCHN = StreamSound_Strict("SFX\Music\" + Music[2] + ".ogg", opt\MusicVolume, Mode)
MusicCHN = StreamSound_Strict("SFX\Music\" + Music[2] + ".ogg", opt\MusicVolume)

Global NowPlaying% = 2, ShouldPlay% = 11
Global CurrMusic% = True
Expand Down
4 changes: 2 additions & 2 deletions Source Code/Main_Core.bb
Original file line number Diff line number Diff line change
Expand Up @@ -8633,7 +8633,7 @@ Function UpdateEnding%()
ShouldPlay = 22
opt\CurrMusicVolume = opt\MusicVolume
StopStream_Strict(MusicCHN) : MusicCHN = 0
MusicCHN = StreamSound_Strict("SFX\Music\" + Music[22] + ".ogg", opt\CurrMusicVolume * opt\MasterVolume, 0)
MusicCHN = StreamSound_Strict("SFX\Music\" + Music[22] + ".ogg", opt\CurrMusicVolume * opt\MasterVolume, False)
NowPlaying = ShouldPlay

PlaySound_Strict(snd_I\LightOffSFX)
Expand Down Expand Up @@ -8667,7 +8667,7 @@ Function UpdateEnding%()
If TempSounds[i] <> 0 Then FreeSound_Strict(TempSounds[i]) : TempSounds[i] = 0
Next
StopStream_Strict(MusicCHN) : MusicCHN = 0
MusicCHN = StreamSound_Strict("SFX\Music\" + Music[NowPlaying] + ".ogg", 0.0, Mode)
MusicCHN = StreamSound_Strict("SFX\Music\" + Music[NowPlaying] + ".ogg", 0.0)
SetStreamVolume_Strict(MusicCHN, opt\MusicVolume * opt\MasterVolume)
me\EndingTimer = -2000.0
ShouldDeleteGadgets = True
Expand Down
4 changes: 2 additions & 2 deletions Source Code/Sounds_Core.bb
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ Function UpdateMusic%()

If NowPlaying < 66
If (Not CurrMusic)
MusicCHN = StreamSound_Strict("SFX\Music\" + Music[NowPlaying] + ".ogg", 0.0, Mode)
MusicCHN = StreamSound_Strict("SFX\Music\" + Music[NowPlaying] + ".ogg", 0.0)
CurrMusic = True
EndIf
SetStreamVolume_Strict(MusicCHN, opt\CurrMusicVolume * opt\MasterVolume)
Expand Down Expand Up @@ -461,7 +461,7 @@ Function PlayAnnouncement%(File$) ; ~ This function streams the announcement cur
If (Not PlayerInReachableRoom(True, True)) Then Return

If IntercomStreamCHN <> 0 Then StopStream_Strict(IntercomStreamCHN) : IntercomStreamCHN = 0
IntercomStreamCHN = StreamSound_Strict(File, opt\VoiceVolume * opt\MasterVolume, 0)
IntercomStreamCHN = StreamSound_Strict(File, opt\VoiceVolume * opt\MasterVolume, False)
End Function

Function UpdateStreamSounds%()
Expand Down
11 changes: 4 additions & 7 deletions Source Code/Strict_Functions_Core.bb
Original file line number Diff line number Diff line change
Expand Up @@ -135,10 +135,7 @@ Type Stream
Field CHN%
End Type

Const Mode% = 2
Const TwoD% = 8192

Function StreamSound_Strict%(File$, Volume# = 1.0, CustomMode% = Mode)
Function StreamSound_Strict%(File$, Volume# = 1.0, Loop% = True)
If FileType(lang\LanguagePath + File) = 1 Then File = lang\LanguagePath + File
If FileType(File) <> 1
OpenConsoleOnError(Format(GetLocalString("runerr", "sound.notfound"), File))
Expand All @@ -147,14 +144,14 @@ Function StreamSound_Strict%(File$, Volume# = 1.0, CustomMode% = Mode)

Local st.Stream = New Stream

st\CHN = PlayMusic(File, CustomMode + TwoD)
st\CHN = PlayMusic(File, Volume)

If st\CHN = -1
OpenConsoleOnError(Format(Format(GetLocalString("runerr", "sound.stream.failed.n1"), File, "{0}"), st\CHN, "{1}"))
Return(-1)
EndIf
ChannelVolume(st\CHN, Volume)


ChannelLoop(st\CHN, Loop)
CreateSubtitlesToken(File, Null)

Return(Handle(st))
Expand Down
Binary file removed fmod.dll
Binary file not shown.