Skip to content

Commit edf0272

Browse files
committed
Squashed commit of the following:
commit 915c53e Author: Sabian Roberts <[email protected]> Date: Tue Nov 11 19:12:57 2025 +0000 Add game pause detection to OpenAL music system commit e1906bf Author: Sabian Roberts <[email protected]> Date: Tue Nov 11 18:53:59 2025 +0000 Add MP3 support and soundtrack queue system Integrated dr_mp3 library for MP3 playback and extended CSoundtrackSystem to support MP3 files. Added soundtrack queue management, playback controls, and new console commands for queueing, skipping, clearing, and inspecting soundtrack tracks. Improved OGG loading robustness and refactored code for better error handling and state management. commit d21a082 Author: Sabian Roberts <[email protected]> Date: Tue Nov 11 16:33:43 2025 +0000 Re-add my fork of OpenAL with halflife fixes commit ee9d82f Author: Sabian Roberts <[email protected]> Date: Tue Nov 11 16:22:38 2025 +0000 Remove OpenAL Soft commit 6fab704 Author: Sabian Roberts <[email protected]> Date: Tue Nov 11 01:07:16 2025 +0000 Add OGG soundtrack support and refactor audio system Refactored CWavPlayer to CSoundtrackSystem to support both WAV and OGG playback using OpenAL and libvorbis. Updated CMakeLists.txt to include ogg and vorbis libraries and headers. Replaced old command interface with soundtrack_play and soundtrack_stop commands, supporting looped playback. Updated initialization and shutdown logic to use the new system. commit 0c76747 Author: Sabian Roberts <[email protected]> Date: Tue Nov 11 00:23:29 2025 +0000 Add OGG submodules commit 994aa79 Author: Sabian Roberts <[email protected]> Date: Tue Nov 11 00:15:59 2025 +0000 Rename WavPlayer to SoundtrackSystem commit cdc0e3f Merge: 46bf742 f3affdb Author: Sabian Roberts <[email protected]> Date: Tue Nov 11 00:11:57 2025 +0000 Merge branch 'dev' into dev_openAL commit 46bf742 Author: Sabian Roberts <[email protected]> Date: Tue Nov 11 00:07:03 2025 +0000 Update CMakeLists.txt commit fe0ab89 Author: Sabian Roberts <[email protected]> Date: Tue Nov 11 00:01:49 2025 +0000 Downgrade OpenAL to 1.24.3 commit f329ad4 Author: Sabian Roberts <[email protected]> Date: Mon Nov 10 23:58:34 2025 +0000 Update CMakeLists.txt commit 17cdf52 Author: Sabian Roberts <[email protected]> Date: Mon Nov 10 23:55:46 2025 +0000 Update CMakeLists.txt commit 1d2357a Author: Sabian Roberts <[email protected]> Date: Mon Nov 10 23:53:35 2025 +0000 Update openal-soft commit d7ef3d6 Author: Sabian Roberts <[email protected]> Date: Mon Oct 13 20:19:29 2025 +0100 Add OpenAL WAV audio playback support Introduces a new CWavPlayer class for WAV audio playback using OpenAL, with play and stop console commands. Integrates initialization and shutdown of the audio system into the client DLL lifecycle, and updates CMakeLists to include the new audio module. commit d36ffa5 Author: Sabian Roberts <[email protected]> Date: Mon Oct 13 17:55:24 2025 +0100 Update openal-soft commit d62e4dd Author: Sabian Roberts <[email protected]> Date: Mon Oct 13 17:54:43 2025 +0100 Update CMakeLists.txt
1 parent f3affdb commit edf0272

File tree

14 files changed

+6086
-8
lines changed

14 files changed

+6086
-8
lines changed

.gitmodules

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,16 @@
33
url = https://github.com/YaLTeR/discord-rpc.git
44
branch = xp
55
shallow = true
6-
[submodule "external/openal-soft"]
7-
path = external/openal-soft
8-
url = https://github.com/kcat/openal-soft.git
96
[submodule "source_sdk"]
107
path = source_sdk
118
url = https://github.com/sabianroberts/hl1_source_sdk.git
9+
[submodule "external/ogg"]
10+
path = external/ogg
11+
url = https://github.com/xiph/ogg
12+
[submodule "external/vorbis"]
13+
path = external/vorbis
14+
url = https://github.com/xiph/vorbis
15+
[submodule "external/openal-soft"]
16+
path = external/openal-soft
17+
url = https://github.com/sabianroberts/openal-soft.git
18+
branch = halflife

CMakeLists.txt

Lines changed: 35 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,31 @@
11
set(CMAKE_POLICY_VERSION_MINIMUM 3.23)
22
cmake_minimum_required(VERSION 3.23)
3+
set(ALSOFT_USE_CPP20_MODULES OFF CACHE BOOL "Disable OpenAL C++20 modules" FORCE)
4+
set(CMAKE_CXX_SCAN_FOR_MODULES OFF CACHE BOOL "Disable module scanning" FORCE)
5+
set(ALSOFT_UTILS OFF CACHE BOOL "" FORCE)
6+
set(ALSOFT_TESTS OFF CACHE BOOL "" FORCE)
7+
set(ALSOFT_EXAMPLES OFF CACHE BOOL "" FORCE)
8+
9+
set(ALSOFT_INSTALL OFF CACHE BOOL "" FORCE)
10+
11+
set(ALSOFT_NO_CONFIG_UTIL OFF CACHE BOOL "" FORCE)
12+
13+
set(BUILD_SHARED_LIBS OFF CACHE BOOL "" FORCE)
14+
set(OGG_BUILD_TESTS OFF CACHE BOOL "" FORCE)
15+
set(VORBIS_BUILD_TESTS OFF CACHE BOOL "" FORCE)
16+
set(VORBIS_ENABLE_DOCS OFF CACHE BOOL "" FORCE)
17+
18+
# Completely disable system OpenAL discovery
19+
set(OpenAL_ROOT "" CACHE PATH "" FORCE)
20+
set(OPENAL_LIBRARY "" CACHE FILEPATH "" FORCE)
21+
set(OPENAL_INCLUDE_DIR "" CACHE PATH "" FORCE)
22+
set(OPENAL_INCLUDE_DIRS "" CACHE PATH "" FORCE)
23+
set(OPENAL_FOUND FALSE CACHE BOOL "" FORCE)
24+
unset(OpenAL_ROOT CACHE)
25+
unset(OPENAL_INCLUDE_DIR CACHE)
26+
unset(OPENAL_LIBRARY CACHE)
27+
28+
329

430
set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<OR:$<CONFIG:Debug>,$<CONFIG:SteamDebug>,$<CONFIG:HaloDebug>>:Debug>DLL")
531

@@ -163,6 +189,9 @@ add_subdirectory(dlls)
163189
add_subdirectory(game_shared)
164190
add_subdirectory(pm_shared)
165191
add_subdirectory(public)
192+
add_subdirectory(external/openal-soft)
193+
add_subdirectory(external/ogg)
194+
add_subdirectory(external/vorbis)
166195
add_subdirectory(source_sdk)
167196

168197
get_property(SOURCE_FILES GLOBAL PROPERTY SOURCE_FILES)
@@ -181,6 +210,10 @@ target_include_directories(client PRIVATE
181210
engine
182211
external
183212
external/discord-rpc/include
213+
external/openal-soft/include
214+
external/ogg/include
215+
external/vorbis/include
216+
external/drmp3
184217
game_shared
185218
pm_shared
186219
public
@@ -287,5 +320,5 @@ target_compile_definitions(client PRIVATE
287320
-DCLIENT_DLL
288321
-DCLIENT_WEAPONS
289322
-DUPDATE_CHECK)
290-
291-
target_link_libraries(client discord-rpc)
323+
324+
target_link_libraries(client discord-rpc OpenAL vorbisfile vorbis ogg)

cl_dll/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
add_subdirectory(audio)
12
add_subdirectory(gameui)
23
add_subdirectory(halo_weapons)
34
add_subdirectory(hl)

cl_dll/audio/CMakeLists.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
add_sources(
2+
openal_wav.cpp
3+
openal_wav.h)

0 commit comments

Comments
 (0)