mirror of
https://gitlab.com/then-try-this/samplebrain.git
synced 2025-05-12 10:37:20 +00:00
conflict
This commit is contained in:
commit
39d4c9c034
@ -23,7 +23,6 @@
|
||||
|
||||
#include "process_thread.h"
|
||||
#include "audio_thread.h"
|
||||
//#include "pitchshift.h"
|
||||
|
||||
using namespace std;
|
||||
|
||||
@ -34,8 +33,6 @@ int main( int argc , char *argv[] ){
|
||||
|
||||
cerr<<"Qt version: "<<qVersion()<<endl;
|
||||
|
||||
//pitchshift::init(44100);
|
||||
|
||||
process_thread pt;
|
||||
audio_thread at(pt);
|
||||
pt.register_renderer(at.m_left_renderer, at.m_right_renderer, at.m_block_stream);
|
||||
|
@ -58,37 +58,37 @@ bool portaudio_client::attach(const string &client_name, const device_options &d
|
||||
PaDeviceIndex output_device_num = Pa_GetDefaultOutputDevice();
|
||||
PaDeviceIndex input_device_num = Pa_GetDefaultInputDevice();
|
||||
|
||||
//output_device_num = 4;
|
||||
//input_device_num = 4;
|
||||
|
||||
PaStreamParameters output_parameters;
|
||||
output_parameters.device = output_device_num;
|
||||
if (output_parameters.device == paNoDevice) {
|
||||
cerr<<"error: no default output device."<<endl;
|
||||
}
|
||||
} else {
|
||||
output_parameters.channelCount = 2; /* stereo output */
|
||||
output_parameters.sampleFormat = paFloat32; /* 32 bit floating point output */
|
||||
output_parameters.suggestedLatency = Pa_GetDeviceInfo( output_parameters.device )->defaultLowOutputLatency;
|
||||
output_parameters.hostApiSpecificStreamInfo = NULL;
|
||||
|
||||
cerr<<"Connecting to "<<Pa_GetDeviceInfo( output_parameters.device )->name<<" for output"<<endl;
|
||||
}
|
||||
|
||||
|
||||
PaStreamParameters input_parameters;
|
||||
PaStreamParameters *input_p=&input_parameters;
|
||||
input_parameters.device = input_device_num;
|
||||
if (input_parameters.device == paNoDevice) {
|
||||
cerr<<"error: no default input device."<<endl;
|
||||
}
|
||||
input_p=0;
|
||||
} 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;
|
||||
|
||||
err = Pa_OpenStream(&stream,
|
||||
&input_parameters,
|
||||
input_p,
|
||||
&output_parameters,
|
||||
dopt.samplerate,
|
||||
dopt.buffer_size,
|
||||
@ -147,7 +147,7 @@ int portaudio_client::process(const void *input_buffer, void *output_buffer,
|
||||
}
|
||||
}
|
||||
|
||||
if (m_right_in_data && m_left_in_data) {
|
||||
if (input_buffer && m_right_in_data && m_left_in_data) {
|
||||
float *in = (float*)input_buffer;
|
||||
for (unsigned int n=0; n<m_buffer_size; n++) {
|
||||
m_left_in_data[n]=*in;
|
||||
|
@ -41,7 +41,8 @@ SOURCES += app/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
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user