diff --git a/.github/workflows/win_msvc.yml b/.github/workflows/win_msvc.yml index f0c98187..e621a630 100644 --- a/.github/workflows/win_msvc.yml +++ b/.github/workflows/win_msvc.yml @@ -5,8 +5,8 @@ on: branches: [ master ] tags: ['*'] paths-ignore: ['**.md'] - pull_request: - branches: [ master ] + # pull_request: + # branches: [ master ] env: VCPKG_ROOT: C:\vcpkg diff --git a/CMakeLists.txt b/CMakeLists.txt index f80196f6..1971e558 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -92,6 +92,7 @@ configure_file(config.h.in config.h) if(WIN32) install(FILES COPYING DESTINATION .) install(FILES README.md DESTINATION .) + install(FILES data/alsoft DESTINATION . RENAME alsoft.ini) install(DIRECTORY docs/ DESTINATION docs) install(DIRECTORY examples/ DESTINATION docs/examples) install(DIRECTORY autoload/ DESTINATION autoload) @@ -101,6 +102,7 @@ if(WIN32) else() install(FILES COPYING DESTINATION "share/doc/${PROJECT_SHORTNAME}") install(FILES README.md DESTINATION "share/doc/${PROJECT_SHORTNAME}") + install(FILES data/alsoft DESTINATION "share/${PROJECT_SHORTNAME}" RENAME alsoft.conf) install(DIRECTORY autoload/ DESTINATION "share/${PROJECT_SHORTNAME}/autoload") if(EXISTS "${CMAKE_SOURCE_DIR}/docs") install(DIRECTORY docs/ DESTINATION "share/doc/${PROJECT_SHORTNAME}") diff --git a/data/alsoft b/data/alsoft new file mode 100644 index 00000000..d64f8d47 --- /dev/null +++ b/data/alsoft @@ -0,0 +1,3 @@ +# OpenAL configuration. More options at +# https://github.com/kcat/openal-soft/blob/master/alsoftrc.sample +resampler = linear diff --git a/src/i_sound.c b/src/i_sound.c index b843083b..98fd79a0 100644 --- a/src/i_sound.c +++ b/src/i_sound.c @@ -549,13 +549,17 @@ void I_InitSound(void) ALCdevice *device; ALCcontext *context; - if (nosfxparm) + if (nosfxparm && nomusicparm) { return; } printf("I_InitSound: "); +#ifdef WOOFDATADIR + setenv("ALSOFT_CONF", WOOFDATADIR"/alsoft.conf", 0); +#endif + name = alcGetString(NULL, ALC_DEFAULT_DEVICE_SPECIFIER); device = alcOpenDevice(name); @@ -585,6 +589,7 @@ void I_InitSound(void) snd_init = true; // [FG] precache all sound effects + if (!nosfxparm) { int i;