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

Sounds #11

Merged
merged 3 commits into from
Oct 16, 2024
Merged
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
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ include(FetchContent)
# SFML we take from master - can pin to an SFML 3 release when there is one
# We use this for window, audio and graphics
set(SFML_STATIC_LIBRARIES ON)
set(SFML_FIND_COMPONENTS Graphics)
set(SFML_FIND_COMPONENTS Graphics Audio)
FetchContent_Declare(
sfml
GIT_REPOSITORY https://github.com/sfml/sfml
Expand All @@ -47,7 +47,7 @@ FetchContent_Declare(
FetchContent_MakeAvailable(sfml spdlog)

# Link them
target_link_libraries(${CMAKE_PROJECT_NAME} PRIVATE SFML::Graphics spdlog::spdlog)
target_link_libraries(${CMAKE_PROJECT_NAME} PRIVATE SFML::Graphics SFML::Audio spdlog::spdlog)

# Sym link the wads folder into the build output
if(APPLE)
Expand Down
6 changes: 3 additions & 3 deletions src/main.ixx
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ import intermission;
import video;
import status_bar;
import hud;
import sound;

// List of wad files we populate on start up
std::vector<std::string> wadfilenames;
Expand Down Expand Up @@ -390,9 +391,6 @@ void D_DoomLoop(void) {

// Update display, next frame, with current state.
D_Display();

// Sound mixing for the buffer is snychronous.
I_UpdateSound();
}
}

Expand Down Expand Up @@ -793,6 +791,8 @@ export void D_DoomMain(void) {
printf("\nP_Init: Init Playloop state.\n");
P_Init();

I_InitSound();

printf("I_Init: Setting up machine state.\n");
I_Init();

Expand Down
Loading