mirror of
https://gitlab.com/then-try-this/samplebrain.git
synced 2025-05-12 10:37:20 +00:00
fix for running with no output device, and mac building
This commit is contained in:
parent
1baab88cf1
commit
8724d52555
@ -41,7 +41,8 @@ SOURCES += MainWindow.cpp \
|
||||
../brain/src/spiralcore/stream.cpp
|
||||
|
||||
INCLUDEPATH += ../brain/src
|
||||
LIBS += -L.. -lportaudio -lfftw3 -lsndfile -llo -ldl -lpthread -lm
|
||||
INCLUDEPATH += /usr/local/include
|
||||
LIBS += -L.. -L/usr/local/lib -lportaudio -lfftw3 -lsndfile -llo -ldl -lpthread -lm
|
||||
CONFIG+=debug
|
||||
|
||||
QMAKE_CXXFLAGS += -Wall -Wno-unused -std=c++11
|
||||
|
@ -77,13 +77,13 @@ bool portaudio_client::attach(const string &client_name, const device_options &d
|
||||
input_parameters.device = input_device_num;
|
||||
if (input_parameters.device == paNoDevice) {
|
||||
cerr<<"error: no default input device."<<endl;
|
||||
}
|
||||
input_parameters.channelCount = 2; /* stereo output */
|
||||
input_parameters.sampleFormat = paFloat32; /* 32 bit floating point output */
|
||||
input_parameters.suggestedLatency = Pa_GetDeviceInfo( input_parameters.device )->defaultLowInputLatency;
|
||||
input_parameters.hostApiSpecificStreamInfo = NULL;
|
||||
|
||||
cerr<<"Connecting to "<<Pa_GetDeviceInfo( input_parameters.device )->name<<" for input"<<endl;
|
||||
} else {
|
||||
input_parameters.channelCount = 2; /* stereo output */
|
||||
input_parameters.sampleFormat = paFloat32; /* 32 bit floating point output */
|
||||
input_parameters.suggestedLatency = Pa_GetDeviceInfo( input_parameters.device )->defaultLowInputLatency;
|
||||
input_parameters.hostApiSpecificStreamInfo = NULL;
|
||||
cerr<<"Connecting to "<<Pa_GetDeviceInfo( input_parameters.device )->name<<" for input"<<endl;
|
||||
}
|
||||
|
||||
PaStream *stream;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user