Skip to content

Commit

Permalink
Default to 48kHz on Windows
Browse files Browse the repository at this point in the history
Refs #1390
  • Loading branch information
glebm authored and AJenbo committed Apr 16, 2022
1 parent 20cf8cb commit b28c659
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions Source/options.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,17 @@ namespace devilution {
#define DEFAULT_HEIGHT 480
#endif
#ifndef DEFAULT_AUDIO_SAMPLE_RATE
#if defined(_WIN64) || defined(_WIN32)
// The sound API used by SDL in Windows (WASAPI) isn't great
// at upsampling from 22050 Hz on some drivers.
//
// Upsample ourselves on Windows by default.
// See https://github.com/diasurgical/devilutionX/issues/1390
#define DEFAULT_AUDIO_SAMPLE_RATE 48000
#else
#define DEFAULT_AUDIO_SAMPLE_RATE 22050
#endif
#endif
#ifndef DEFAULT_AUDIO_CHANNELS
#define DEFAULT_AUDIO_CHANNELS 2
#endif
Expand Down

0 comments on commit b28c659

Please sign in to comment.