Commit 94ff6adb authored by Stephane Letz's avatar Stephane Letz
Browse files

Correct JackPosixSemaphore::Allocate and JackPosixSemaphore::ConnectInput.

parent 0fb47a84
...@@ -145,7 +145,7 @@ bool JackPosixSemaphore::Allocate(const char* name, const char* server_name, int ...@@ -145,7 +145,7 @@ bool JackPosixSemaphore::Allocate(const char* name, const char* server_name, int
BuildName(name, server_name, fName, sizeof(fName)); BuildName(name, server_name, fName, sizeof(fName));
jack_log("JackPosixSemaphore::Allocate name = %s val = %ld", fName, value); jack_log("JackPosixSemaphore::Allocate name = %s val = %ld", fName, value);
if ((fSemaphore = sem_open(fName, O_CREAT, 0777, value)) == (sem_t*)SEM_FAILED) { if ((fSemaphore = sem_open(fName, O_CREAT | O_RDWR, 0777, value)) == (sem_t*)SEM_FAILED) {
jack_error("Allocate: can't check in named semaphore name = %s err = %s", fName, strerror(errno)); jack_error("Allocate: can't check in named semaphore name = %s err = %s", fName, strerror(errno));
return false; return false;
} else { } else {
...@@ -165,7 +165,7 @@ bool JackPosixSemaphore::ConnectInput(const char* name, const char* server_name) ...@@ -165,7 +165,7 @@ bool JackPosixSemaphore::ConnectInput(const char* name, const char* server_name)
return true; return true;
} }
if ((fSemaphore = sem_open(fName, O_CREAT)) == (sem_t*)SEM_FAILED) { if ((fSemaphore = sem_open(fName, O_RDWR)) == (sem_t*)SEM_FAILED) {
jack_error("Connect: can't connect named semaphore name = %s err = %s", fName, strerror(errno)); jack_error("Connect: can't connect named semaphore name = %s err = %s", fName, strerror(errno));
return false; return false;
} else { } else {
......
...@@ -98,7 +98,7 @@ PaError JackPortAudioDriver::OpenStream(jack_nframes_t buffer_size) ...@@ -98,7 +98,7 @@ PaError JackPortAudioDriver::OpenStream(jack_nframes_t buffer_size)
// Update parameters // Update parameters
inputParameters.device = fInputDevice; inputParameters.device = fInputDevice;
inputParameters.channelCount = fCaptureChannels; inputParameters.channelCount = fCaptureChannels;
inputParameters.sampleFormat = paFloat32 | paNonInterleaved; // 32 bit floating point output inputParameters.sampleFormat = paFloat32 | paNonInterleaved; // 32 bit floating point input
inputParameters.suggestedLatency = (fInputDevice != paNoDevice) // TODO: check how to setup this on ASIO inputParameters.suggestedLatency = (fInputDevice != paNoDevice) // TODO: check how to setup this on ASIO
? ((fPaDevices->GetHostFromDevice(fInputDevice) == "ASIO") ? 0 : Pa_GetDeviceInfo(inputParameters.device)->defaultLowInputLatency) ? ((fPaDevices->GetHostFromDevice(fInputDevice) == "ASIO") ? 0 : Pa_GetDeviceInfo(inputParameters.device)->defaultLowInputLatency)
: 0; : 0;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment