summaryrefslogtreecommitdiff
path: root/libs
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2020-04-29 01:16:23 +0200
committerRobin Gareus <robin@gareus.org>2020-04-29 01:16:23 +0200
commit3d5ea7dfab00cc52d99f3b4483986b092c66830d (patch)
tree2d1cce1913c8cab3c2db55c06b1b75abcc36135c /libs
parentcce6ac3e739a7589e82cdd9945bd9cde21eb659d (diff)
ALSA: set min/max sizes before the debug message
Diffstat (limited to 'libs')
-rw-r--r--libs/ardouralsautil/deviceparams.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/libs/ardouralsautil/deviceparams.cc b/libs/ardouralsautil/deviceparams.cc
index 613eac76e0..05e51201ef 100644
--- a/libs/ardouralsautil/deviceparams.cc
+++ b/libs/ardouralsautil/deviceparams.cc
@@ -103,6 +103,9 @@ ARDOUR::get_alsa_device_parameters (const char* device_name, const bool play, AL
snd_pcm_close (pcm);
+ nfo->min_size = std::max (min_psiz, min_bufz / nfo->max_nper);
+ nfo->max_size = std::min (max_psiz, max_bufz / nfo->min_nper);
+
/* see also libs/backends/alsa/zita-alsa-pcmi.cc
* If any debug parameter is set, print device info.
*/
@@ -121,8 +124,6 @@ ARDOUR::get_alsa_device_parameters (const char* device_name, const bool play, AL
fprintf (stdout, " possible : %lu .. %lu\n", nfo->min_size, nfo->max_size);
}
- nfo->min_size = std::max (min_psiz, min_bufz / nfo->max_nper);
- nfo->max_size = std::min (max_psiz, max_bufz / nfo->min_nper);
nfo->valid = true;
return 0;