-
-
Notifications
You must be signed in to change notification settings - Fork 387
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Set audio frequency to 44100 on Windows (#6455)
- Loading branch information
1 parent
48dfaf1
commit 8383249
Showing
1 changed file
with
7 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
/*************************************************************************** | ||
* fheroes2: https://github.com/ihhub/fheroes2 * | ||
* Copyright (C) 2019 - 2022 * | ||
* Copyright (C) 2019 - 2023 * | ||
* * | ||
* Free Heroes2 Engine: http://sourceforge.net/projects/fheroes2 * | ||
* Copyright (C) 2008 by Andrey Afletdinov <[email protected]> * | ||
|
@@ -58,12 +58,17 @@ namespace | |
Spec() | ||
: SDL_AudioSpec() | ||
{ | ||
#if defined( _WIN32 ) | ||
// Value 22050 causes audio distortion on Windows | ||
freq = 44100; | ||
#else | ||
freq = 22050; | ||
#endif | ||
format = AUDIO_S16; | ||
channels = 2; // Support stereo audio. | ||
silence = 0; | ||
#if defined( ANDROID ) | ||
// TODO: a value greater than 1024 causes audio distortion on Android | ||
// Value greater than 1024 causes audio distortion on Android | ||
samples = 1024; | ||
#else | ||
samples = 2048; | ||
|