From b12f865a4ac161c2d9e08379a83842342975090c Mon Sep 17 00:00:00 2001 From: Tim Mayberry Date: Tue, 19 May 2015 13:58:35 +1000 Subject: [PATCH] Fix for PortAudioBackend::available_sample_rates Was being called without initializing PA. PA should probably be initialized in ctor but PA backend also needs to support hot-plugging devices at some point so this will do for now --- libs/backends/portaudio/portaudio_io.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/backends/portaudio/portaudio_io.cc b/libs/backends/portaudio/portaudio_io.cc index a7c4516b53..b7ea02ff22 100644 --- a/libs/backends/portaudio/portaudio_io.cc +++ b/libs/backends/portaudio/portaudio_io.cc @@ -63,7 +63,7 @@ PortAudioIO::available_sample_rates(int device_id, std::vector& sampleRat { static const float ardourRates[] = { 8000.0, 22050.0, 24000.0, 44100.0, 48000.0, 88200.0, 96000.0, 176400.0, 192000.0}; - assert(_initialized); + if (!initialize_pa()) return -1; // TODO use separate int device_input, int device_output ?! if (device_id == -1) {