Skip to content

Commit

Permalink
Something vaguely resembling sounds
Browse files Browse the repository at this point in the history
  • Loading branch information
JonnyPtn committed Oct 3, 2024
1 parent 476ccd8 commit 3283732
Show file tree
Hide file tree
Showing 3 changed files with 70 additions and 393 deletions.
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

0 comments on commit 3283732

Please sign in to comment.