Force PA to use 48K Sample Rate if default is 44.1K

monitor
Phil Taylor 2021-11-15 15:26:18 +00:00
rodzic 04526db635
commit b5591e0867
1 zmienionych plików z 7 dodań i 3 usunięć

Wyświetl plik

@ -223,10 +223,14 @@ bool audioHandler::init(audioSetup setupIn)
aParams.hostApiSpecificStreamInfo = NULL;
// Always use the "preferred" sample rate
// Always use the "preferred" sample rate (unless it is 44100)
// We can always resample if needed
this->nativeSampleRate = info->defaultSampleRate;
if (info->defaultSampleRate == 44100) {
this->nativeSampleRate = 48000;
}
else {
this->nativeSampleRate = info->defaultSampleRate;
}
// Per channel chunk size.
this->chunkSize = (this->nativeSampleRate / 50);