Ok, i took that advice and timed the synthesiser's renderNextBlock(). It normally only takes a couple ms to do its thing, but at around the 1 minute mark it jumps. So i set it up to hit a breakpoint when it does that, but I don't see anything that's obviously wrong. Do you mind taking a glance at the stack trace? Maybe you'll see something I don't.
-n
Juce Message Thread (1)Queue : com.apple.main-thread (serial)
#0 0x34cd24f0 in mach_msg_trap ()
#1 0x34cd22e8 in mach_msg ()
#2 0x26bbc93a in __CFRunLoopServiceMachPort ()
#3 0x26bbaee0 in __CFRunLoopRun ()
#4 0x26b09210 in CFRunLoopRunSpecific ()
#5 0x26b09022 in CFRunLoopRunInMode ()
#6 0x2ded90a8 in GSEventRunModal ()
#7 0x2a1151d0 in UIApplicationMain ()
#8 0x002aa052 in juce::juce_iOSMain(int, char const**) at /Users/nhdika/Code/photophore/JuceLibraryCode/modules/juce_gui_basics/native/juce_ios_Windowing.mm:95
#9 0x001889b4 in juce::JUCEApplicationBase::main(int, char const**) at /Users/nhdika/Code/photophore/JuceLibraryCode/modules/juce_events/messages/juce_ApplicationBase.cpp:216
#10 0x000ad41a in main at /Users/nhdika/Code/photophore/Source/Main.cpp:168
Thread 5Queue : com.apple.libdispatch-manager (serial)
#0 0x34cd22a0 in kevent64 ()
#1 0x00e41678 in _dispatch_mgr_invoke ()
#2 0x00e3649a in _dispatch_mgr_thread ()
gputools.smt_poll.0x15d19f80 (6)
#0 0x34ce619c in __semwait_signal ()
#1 0x34c45a70 in nanosleep ()
#2 0x34c459c0 in usleep ()
#3 0x00e7eff8 in smt_poll_thread_entry(void*) ()
#4 0x34d62e92 in _pthread_body ()
#5 0x34d62e06 in _pthread_start ()
AVAudioSession Notify Thread (9)
#0 0x34cd24f0 in mach_msg_trap ()
#1 0x34cd22e8 in mach_msg ()
#2 0x26bbc93a in __CFRunLoopServiceMachPort ()
#3 0x26bbaee0 in __CFRunLoopRun ()
#4 0x26b09210 in CFRunLoopRunSpecific ()
#5 0x26b09022 in CFRunLoopRunInMode ()
#6 0x258133ee in GenericRunLoopThread::Entry(void*) ()
#7 0x2580590a in CAPThread::Entry(CAPThread*) ()
#8 0x34d62e92 in _pthread_body ()
#9 0x34d62e06 in _pthread_start ()
com.apple.CFSocket.private (10)
#0 0x34ce608c in __select ()
#1 0x26bc1106 in __CFSocketManager ()
#2 0x34d62e92 in _pthread_body ()
#3 0x34d62e06 in _pthread_start ()
us.audiob.listener (11)
#0 0x34cd24f0 in mach_msg_trap ()
#1 0x34cd22e8 in mach_msg ()
#2 0x26bbc93a in __CFRunLoopServiceMachPort ()
#3 0x26bbaee0 in __CFRunLoopRun ()
#4 0x26b09210 in CFRunLoopRunSpecific ()
#5 0x26b51e7a in CFRunLoopRun ()
#6 0x0034341e in -[DBLocalEndpointListenerThread main] ()
#7 0x27905b5a in __NSThread__main__ ()
#8 0x34d62e92 in _pthread_body ()
#9 0x34d62e06 in _pthread_start ()
AURemoteIO::IOThread (12)
#0 0x000e2d16 in Synth::renderNextBlock(juce::AudioSampleBuffer&, juce::MidiBuffer const&, int, int) at /Users/nhdika/Code/photophore/Source/Synth.cpp:230
#1 0x000e1262 in SynthAudioSource::getNextAudioBlock(juce::AudioSourceChannelInfo const&) at /Users/nhdika/Code/photophore/Source/SynthAudioSource.cpp:55
#2 0x0010df4c in juce::AudioSourcePlayer::audioDeviceIOCallback(float const**, int, float**, int, int) at /Users/nhdika/Code/photophore/JuceLibraryCode/modules/juce_audio_devices/sources/juce_AudioSourcePlayer.cpp:142
#3 0x0010afec in juce::AudioDeviceManager::audioDeviceIOCallbackInt(float const**, int, float**, int, int) at /Users/nhdika/Code/photophore/JuceLibraryCode/modules/juce_audio_devices/audio_io/juce_AudioDeviceManager.cpp:727
#4 0x0011a604 in juce::AudioDeviceManager::CallbackHandler::audioDeviceIOCallback(float const**, int, float**, int, int) at /Users/nhdika/Code/photophore/JuceLibraryCode/modules/juce_audio_devices/audio_io/juce_AudioDeviceManager.cpp:56
#5 0x00110256 in juce::iOSAudioIODevice::process(unsigned long*, AudioTimeStamp const*, unsigned long, AudioBufferList*) at /Users/nhdika/Code/photophore/JuceLibraryCode/modules/juce_audio_devices/native/juce_ios_Audio.mm:573
#6 0x001133a6 in juce::iOSAudioIODevice::processStatic(void*, unsigned long*, AudioTimeStamp const*, unsigned long, unsigned long, AudioBufferList*) at /Users/nhdika/Code/photophore/JuceLibraryCode/modules/juce_audio_devices/native/juce_ios_Audio.h:129
#7 0x26384118 in AUInputElement::PullInput(unsigned long&, AudioTimeStamp const&, unsigned long, unsigned long) ()
#8 0x2637caea in AUInputFormatConverter2::InputProc(OpaqueAudioConverter*, unsigned long*, AudioBufferList*, AudioStreamPacketDescription**, void*) ()
#9 0x262abbe4 in AudioConverterChain::CallInputProc(unsigned long) ()
#10 0x262ab954 in AudioConverterChain::FillBufferFromInputProc(unsigned long*, CABufferList*) ()
#11 0x262ab8f2 in BufferedAudioConverter::GetInputBytes(unsigned long, unsigned long&, CABufferList const*&) ()
#12 0x262ab7fc in CBRConverter::RenderOutput(CABufferList*, unsigned long, unsigned long&, AudioStreamPacketDescription*) ()
#13 0x262ab6a2 in BufferedAudioConverter::FillBuffer(unsigned long&, AudioBufferList&, AudioStreamPacketDescription*) ()
#14 0x262ab776 in AudioConverterChain::RenderOutput(CABufferList*, unsigned long, unsigned long&, AudioStreamPacketDescription*) ()
#15 0x262ab6a2 in BufferedAudioConverter::FillBuffer(unsigned long&, AudioBufferList&, AudioStreamPacketDescription*) ()
#16 0x262b9188 in AudioConverterFillComplexBuffer ()
#17 0x2637c9ca in AUInputFormatConverter2::PullAndConvertInput(AudioTimeStamp const&, unsigned long&, AudioBufferList&, AudioStreamPacketDescription*, bool&) ()
#18 0x2637c534 in AUConverterBase::RenderBus(unsigned long&, AudioTimeStamp const&, unsigned long, unsigned long) ()
#19 0x262ad9d6 in AUBase::DoRenderBus(unsigned long&, AudioTimeStamp const&, unsigned long, AUOutputElement*, unsigned long, AudioBufferList&) ()
#20 0x262ad86a in AUBase::DoRender(unsigned long&, AudioTimeStamp const&, unsigned long, unsigned long, AudioBufferList&) ()
#21 0x2637169c in AURemoteIO::PerformIO(unsigned long, unsigned int, unsigned int, AudioTimeStamp const&, AudioTimeStamp const&, AudioBufferList const*, AudioBufferList*, int&) ()
#22 0x26372766 in AURIOCallbackReceiver_PerformIO ()
#23 0x2636a972 in _XPerformIO ()
#24 0x262cc286 in mshMIGPerform ()
#25 0x263444d0 in MSHMIGDispatchMessage ()
#26 0x263719ac in AURemoteIO::IOThread::Run() ()
#27 0x26375098 in AURemoteIO::IOThread::Entry(void*) ()
#28 0x262a99e4 in CAPThread::Entry(CAPThread*) ()
#29 0x34d62e92 in _pthread_body ()
#30 0x34d62e06 in _pthread_start ()
Thread 13
#0 0x34cd24f0 in mach_msg_trap ()
#1 0x34cd22e8 in mach_msg ()
#2 0x27306cca in XServerMachPort::ReceiveMessage(int&, void*, int&) ()
#3 0x27321294 in MIDIProcess::RunMIDIInThread() ()
#4 0x27307e4a in XThread::RunHelper(void*) ()
#5 0x273078a2 in CAPThread::Entry(CAPThread*) ()
#6 0x34d62e92 in _pthread_body ()
#7 0x34d62e06 in _pthread_start ()
OpenGL Rendering (14)
#0 0x34ce619c in __semwait_signal ()
#1 0x34c45a70 in nanosleep ()
#2 0x34c459c0 in usleep ()
#3 0x29be4e52 in native_window_begin_iosurface(_EAGLNativeWindowObject*) ()
#4 0x295cc450 in gliGetNewIOSurfaceES ()
#5 0x2557d388 in sgxResolveDeferredFramebufferOffset ()
#6 0x25572a60 in sgxPatchDeferredFramebufferOffsets ()
#7 0x2557871c in sgxEndRender ()
#8 0x255703aa in glrFlushContextToken ()
#9 0x295cc388 in gliPresentViewES_Exec ()
#10 0x295cc2ba in gliPresentViewES ()
#11 0x295d7064 in -[EAGLContext presentRenderbuffer:] ()
#12 0x00da5fc6 in EAGLContext_presentRenderbuffer(EAGLContext*, objc_selector*, unsigned int) ()
#13 0x00311afe in juce::OpenGLContext::NativeContext::swapBuffers() at /Users/nhdika/Code/photophore/JuceLibraryCode/modules/juce_opengl/native/juce_OpenGL_ios.h:158
#14 0x003100d4 in juce::OpenGLContext::swapBuffers() at /Users/nhdika/Code/photophore/JuceLibraryCode/modules/juce_opengl/opengl/juce_OpenGLContext.cpp:745
#15 0x003178ac in juce::OpenGLContext::CachedImage::renderFrame() at /Users/nhdika/Code/photophore/JuceLibraryCode/modules/juce_opengl/opengl/juce_OpenGLContext.cpp:191
#16 0x0031747c in juce::OpenGLContext::CachedImage::run() at /Users/nhdika/Code/photophore/JuceLibraryCode/modules/juce_opengl/opengl/juce_OpenGLContext.cpp:359
#17 0x0031751c in non-virtual thunk to juce::OpenGLContext::CachedImage::run() at /Users/nhdika/Code/photophore/JuceLibraryCode/modules/juce_opengl/opengl/juce_OpenGLContext.cpp:366
#18 0x0014ca9c in juce::Thread::threadEntryPoint() at /Users/nhdika/Code/photophore/JuceLibraryCode/modules/juce_core/threads/juce_Thread.cpp:101
#19 0x0014cdbe in juce::juce_threadEntryPoint(void*) at /Users/nhdika/Code/photophore/JuceLibraryCode/modules/juce_core/threads/juce_Thread.cpp:113
#20 0x0015a1f2 in threadEntryProc at /Users/nhdika/Code/photophore/JuceLibraryCode/modules/juce_core/native/juce_posix_SharedCode.h:850
#21 0x34d62e92 in _pthread_body ()
#22 0x34d62e06 in _pthread_start ()
Juce Timer (15)
#0 0x34ce5b38 in __psynch_cvwait ()
#1 0x34d623f8 in _pthread_cond_wait ()
#2 0x34d6331c in pthread_cond_timedwait ()
#3 0x0014bd08 in juce::WaitableEvent::wait(int) const at /Users/nhdika/Code/photophore/JuceLibraryCode/modules/juce_core/native/juce_posix_SharedCode.h:97
#4 0x0014d3c4 in juce::Thread::wait(int) const at /Users/nhdika/Code/photophore/JuceLibraryCode/modules/juce_core/threads/juce_Thread.cpp:246
#5 0x001904fa in juce::Timer::TimerThread::run() at /Users/nhdika/Code/photophore/JuceLibraryCode/modules/juce_events/timers/juce_Timer.cpp:106
#6 0x0014ca9c in juce::Thread::threadEntryPoint() at /Users/nhdika/Code/photophore/JuceLibraryCode/modules/juce_core/threads/juce_Thread.cpp:101
#7 0x0014cdbe in juce::juce_threadEntryPoint(void*) at /Users/nhdika/Code/photophore/JuceLibraryCode/modules/juce_core/threads/juce_Thread.cpp:113
#8 0x0015a1f2 in threadEntryProc at /Users/nhdika/Code/photophore/JuceLibraryCode/modules/juce_core/native/juce_posix_SharedCode.h:850
#9 0x34d62e92 in _pthread_body ()
#10 0x34d62e06 in _pthread_start ()
Thread 16
#0 0x34cd2654 in mach_wait_until ()
#1 0x0016dfaa in juce::HighResolutionTimer::Pimpl::Clock::wait() at /Users/nhdika/Code/photophore/JuceLibraryCode/modules/juce_core/native/juce_posix_SharedCode.h:1242
#2 0x0016dea0 in juce::HighResolutionTimer::Pimpl::timerThread() at /Users/nhdika/Code/photophore/JuceLibraryCode/modules/juce_core/native/juce_posix_SharedCode.h:1214
#3 0x0016ddf2 in juce::HighResolutionTimer::Pimpl::timerThread(void*) at /Users/nhdika/Code/photophore/JuceLibraryCode/modules/juce_core/native/juce_posix_SharedCode.h:1203
#4 0x34d62e92 in _pthread_body ()
#5 0x34d62e06 in _pthread_start ()