Browse Source

MacOS Audio Interface fixes

tags/v0.5.0
Andrew Belt 7 years ago
parent
commit
b0a9f72b64
3 changed files with 4 additions and 4 deletions
  1. +2
    -2
      Makefile
  2. +1
    -0
      dep/Makefile
  3. +1
    -2
      src/core/AudioInterface.cpp

+ 2
- 2
Makefile View File

@@ -23,7 +23,7 @@ ifeq ($(ARCH), mac)
CXXFLAGS += -DAPPLE -stdlib=libc++ CXXFLAGS += -DAPPLE -stdlib=libc++
LDFLAGS += -stdlib=libc++ -lpthread -ldl \ LDFLAGS += -stdlib=libc++ -lpthread -ldl \
-framework Cocoa -framework OpenGL -framework IOKit -framework CoreVideo \ -framework Cocoa -framework OpenGL -framework IOKit -framework CoreVideo \
-Ldep/lib -lGLEW -lglfw -ljansson -lsamplerate -lcurl -lzip -lportaudio -lrtmidi
-Ldep/lib -lGLEW -lglfw -ljansson -lsamplerate -lcurl -lzip -lrtaudio -lrtmidi
TARGET = Rack TARGET = Rack
BUNDLE = dist/$(TARGET).app BUNDLE = dist/$(TARGET).app
endif endif
@@ -59,7 +59,7 @@ endif


debug: $(TARGET) debug: $(TARGET)
ifeq ($(ARCH), mac) ifeq ($(ARCH), mac)
lldb ./Rack
DYLD_FALLBACK_LIBRARY_PATH=dep/lib gdb -ex run ./Rack
else else
LD_LIBRARY_PATH=dep/lib gdb -ex run ./Rack LD_LIBRARY_PATH=dep/lib gdb -ex run ./Rack
endif endif


+ 1
- 0
dep/Makefile View File

@@ -41,6 +41,7 @@ ifeq ($(ARCH),mac)
libcurl = lib/libcurl.dylib libcurl = lib/libcurl.dylib
libzip = lib/libzip.dylib libzip = lib/libzip.dylib
rtmidi = lib/librtmidi.dylib rtmidi = lib/librtmidi.dylib
rtaudio = lib/librtaudio.dylib
endif endif


ifeq ($(ARCH),win) ifeq ($(ARCH),win)


+ 1
- 2
src/core/AudioInterface.cpp View File

@@ -208,7 +208,6 @@ std::string AudioInterface::getDeviceName(int deviceId) {
if (deviceId < 0) if (deviceId < 0)
return ""; return "";


std::lock_guard<std::mutex> lock(bufferMutex);
try { try {
RtAudio::DeviceInfo deviceInfo = stream.getDeviceInfo(deviceId); RtAudio::DeviceInfo deviceInfo = stream.getDeviceInfo(deviceId);
return stringf("%s (%d in, %d out)", deviceInfo.name.c_str(), deviceInfo.inputChannels, deviceInfo.outputChannels); return stringf("%s (%d in, %d out)", deviceInfo.name.c_str(), deviceInfo.inputChannels, deviceInfo.outputChannels);
@@ -256,7 +255,7 @@ void AudioInterface::openDevice(int deviceId, float sampleRate, int blockSize) {
inParameters.nChannels = numInputs; inParameters.nChannels = numInputs;


RtAudio::StreamOptions options; RtAudio::StreamOptions options;
options.flags |= RTAUDIO_MINIMIZE_LATENCY;
// options.flags |= RTAUDIO_SCHEDULE_REALTIME;


try { try {
// Don't use stream parameters if 0 input or output channels // Don't use stream parameters if 0 input or output channels


Loading…
Cancel
Save