Use pitch rate to get to proper sample rate...?

This commit is contained in:
Lorenzooone
2024-05-21 15:21:46 +02:00
parent 5d0eb382f6
commit a4c80f1093
2 changed files with 3 additions and 1 deletions

View File

@@ -19,6 +19,7 @@ Audio::Audio(AudioData *audio_data) {
// Consume old events
this->audio_data->check_audio_restart_request();
sf::SoundStream::initialize(AUDIO_CHANNELS, SAMPLE_RATE);
this->setPitch(PITCH_RATE);
#if (SFML_VERSION_MAJOR > 2) || ((SFML_VERSION_MAJOR == 2) && (SFML_VERSION_MINOR >= 6))
// Since we receive data every 16.6 ms, this is useless,
// and only increases CPU load... (Default is 10 ms)