Buffer size and headrom in sound logging now match that shown in AudioDialog.

This commit is contained in:
Stephen Anthony 2018-09-06 10:38:32 -02:30
parent ce9b832f68
commit 3df644ecff
2 changed files with 5 additions and 4 deletions

View File

@ -249,8 +249,10 @@ string SoundSDL2::about() const
} }
buf << " Sample rate: " << uInt32(myHardwareSpec.freq) << endl buf << " Sample rate: " << uInt32(myHardwareSpec.freq) << endl
<< " Frag size: " << uInt32(myHardwareSpec.samples) << endl << " Frag size: " << uInt32(myHardwareSpec.samples) << endl
<< " Buffer size: " << myAudioSettings.bufferSize() << endl << " Head room: " << std::fixed << std::setprecision(1)
<< " Head room: " << myAudioSettings.headroom() << endl << (0.5 * myAudioSettings.headroom()) << " frames" << endl
<< " Buffer size: " << std::fixed << std::setprecision(1)
<< (0.5 * myAudioSettings.bufferSize()) << " frames" << endl
<< " Resampling: "; << " Resampling: ";
switch (myAudioSettings.resamplingQuality()) { switch (myAudioSettings.resamplingQuality()) {
case AudioSettings::ResamplingQuality::nearestNeightbour: case AudioSettings::ResamplingQuality::nearestNeightbour:

View File

@ -219,8 +219,7 @@ void AudioDialog::saveConfig()
audioSettings.setPreset(preset); audioSettings.setPreset(preset);
if (preset == AudioSettings::Preset::custom) { if (preset == AudioSettings::Preset::custom) {
// Fragsize
// Fragsize
audioSettings.setFragmentSize(myFragsizePopup->getSelectedTag().toInt()); audioSettings.setFragmentSize(myFragsizePopup->getSelectedTag().toInt());
audioSettings.setSampleRate(myFreqPopup->getSelectedTag().toInt()); audioSettings.setSampleRate(myFreqPopup->getSelectedTag().toInt());
audioSettings.setHeadroom(myHeadroomSlider->getValue()); audioSettings.setHeadroom(myHeadroomSlider->getValue());