Minor Amuse-AU changes

This commit is contained in:
Jack Andersen 2017-12-15 14:18:57 -10:00
parent 91b88c0568
commit 3eba4cc1ac
4 changed files with 116 additions and 110 deletions

View File

@ -218,7 +218,7 @@
- (void)pumpTimer:(NSTimer*)timer - (void)pumpTimer:(NSTimer*)timer
{ {
amuseEngine->pumpEngine(); booEngine->pumpAndMixVoices();
} }
- (BOOL)applicationShouldTerminateAfterLastWindowClosed:(NSApplication *)sender - (BOOL)applicationShouldTerminateAfterLastWindowClosed:(NSApplication *)sender
@ -251,7 +251,7 @@
{ {
__block NSOpenPanel* panel = [NSOpenPanel openPanel]; __block NSOpenPanel* panel = [NSOpenPanel openPanel];
[panel beginSheetModalForWindow:mainWindow completionHandler:^(NSInteger result) { [panel beginSheetModalForWindow:mainWindow completionHandler:^(NSInteger result) {
if (result == NSFileHandlingPanelOKButton) if (result == NSModalResponseOK)
{ {
[self importURL:panel.URL]; [self importURL:panel.URL];
} }

View File

@ -239,7 +239,7 @@ void AudioGroupCollection::addSamples(std::vector<AudioGroupSampleToken*>& vecOu
} }
} }
AudioGroupDataCollection::AudioGroupDataCollection(const std::string& name, NSURL* proj, NSURL* pool, AudioGroupDataCollection::AudioGroupDataCollection(std::string_view name, NSURL* proj, NSURL* pool,
NSURL* sdir, NSURL* samp, NSURL* meta) NSURL* sdir, NSURL* samp, NSURL* meta)
: m_name(name), m_proj(proj), m_pool(pool), m_sdir(sdir), m_samp(samp), m_meta(meta), : m_name(name), m_proj(proj), m_pool(pool), m_sdir(sdir), m_samp(samp), m_meta(meta),
m_token([[AudioGroupDataToken alloc] initWithDataCollection:this]) {} m_token([[AudioGroupDataToken alloc] initWithDataCollection:this]) {}

View File

@ -113,10 +113,12 @@ struct AudioUnitVoiceEngine : boo::BaseAudioVoiceEngine
m_mixInfo.m_sampleRate = sampleRate; m_mixInfo.m_sampleRate = sampleRate;
_buildAudioRenderClient(); _buildAudioRenderClient();
for (boo::AudioVoice* vox : m_activeVoices) if (m_voiceHead)
vox->_resetSampleRate(vox->m_sampleRateIn); for (boo::AudioVoice& vox : *m_voiceHead)
for (boo::AudioSubmix* smx : m_activeSubmixes) vox._resetSampleRate(vox.m_sampleRateIn);
smx->_resetOutputSampleRate(); if (m_submixHead)
for (boo::AudioSubmix& smx : *m_submixHead)
smx._resetOutputSampleRate();
} }
void pumpAndMixVoices() void pumpAndMixVoices()
@ -281,7 +283,7 @@ struct AudioUnitVoiceEngine : boo::BaseAudioVoiceEngine
/* Output buffers */ /* Output buffers */
voxEngine.m_renderFrames = frameCount; voxEngine.m_renderFrames = frameCount;
voxEngine.m_outputData = outputData; voxEngine.m_outputData = outputData;
amuseEngine.pumpEngine(); voxEngine.pumpAndMixVoices();
return noErr; return noErr;
}; };
} }

View File

@ -1,6 +1,7 @@
if (APPLE AND (NOT CMAKE_OSX_DEPLOYMENT_TARGET OR CMAKE_OSX_DEPLOYMENT_TARGET VERSION_GREATER 10.10)) if (APPLE AND (NOT CMAKE_OSX_DEPLOYMENT_TARGET OR CMAKE_OSX_DEPLOYMENT_TARGET VERSION_GREATER 10.10))
set(APPLE_DEV_ID "" CACHE STRING "Mac Developer ID string 'Mac Developer: John Smith (XXXXXXXXXX)'") set(APPLE_DEV_ID "" CACHE STRING "Mac Developer ID string 'Mac Developer: John Smith (XXXXXXXXXX)'")
set(APPLE_TEAM_ID "" CACHE STRING "Team ID string provisioned within Xcode / Apple's portal") set(APPLE_TEAM_ID "" CACHE STRING "Team ID string provisioned within Xcode / Apple's portal")
if (APPLE_DEV_ID AND APPLE_TEAM_ID)
find_library(AVFOUNDATION_LIBRARY AVFoundation) find_library(AVFOUNDATION_LIBRARY AVFoundation)
find_library(AUDIOUNIT_LIBRARY AudioUnit) find_library(AUDIOUNIT_LIBRARY AudioUnit)
find_library(COREAUDIOKIT_LIBRARY CoreAudioKit) find_library(COREAUDIOKIT_LIBRARY CoreAudioKit)
@ -106,4 +107,7 @@ if (APPLE AND (NOT CMAKE_OSX_DEPLOYMENT_TARGET OR CMAKE_OSX_DEPLOYMENT_TARGET VE
message(WARNING "Unable to find developer provisioning profile; skipping Amuse-AU") message(WARNING "Unable to find developer provisioning profile; skipping Amuse-AU")
endif() endif()
endif() endif()
else()
message(WARNING "APPLE_DEV_ID and/or APPLE_TEAM_ID not set; skipping Amuse-AU")
endif()
endif() endif()