Post

Replies

Boosts

Views

Activity

AUSampler crash: 'breaking out of infinite loop'
I have an AUSampler and occassionally my app will crash with a log message 912: BREAKING OUT OF INFINITE LOOP. The stack trace is:#0 0x000000018515b548 in VoiceZone::Process(unsigned long long, AudioBufferList**, unsigned int, unsigned int) () #1 0x00000001852a17bc in SamplerNote::Render(unsigned long long, unsigned int, AudioBufferList**, unsigned int) () #2 0x00000001852a1b28 in non-virtual thunk to SamplerNote::Render(unsigned long long, unsigned int, AudioBufferList**, unsigned int) () #3 0x000000018544abf4 in SynthGroupElement::Render(long long, unsigned int, AUScope&) () #4 0x000000018544f588 in AUInstrumentBase::Render(unsigned int&, AudioTimeStamp const&, unsigned int) () #5 0x000000018520f168 in SamplerBase::Render(unsigned int&, AudioTimeStamp const&, unsigned int) () #6 0x0000000185445480 in AUBase::DoRenderBus(unsigned int&, AudioTimeStamp const&, unsigned int, AUOutputElement*, unsigned int, AudioBufferList&) () #7 0x0000000185444c0c in AUBase::DoRender(unsigned int&, AudioTimeStamp const&, unsigned int, unsigned int, AudioBufferList&) () #8 0x000000018544dfb0 in AUMethodRender(void*, unsigned int*, AudioTimeStamp const*, unsigned int, unsigned int, AudioBufferList*) () #9 <my code> This only seems to happen with certain presets and certain combinations of events, although I haven't figured out the pattern. Does anyone know why this may be happening and how to prevent it?
2
0
1.3k
Dec ’17
Update MPRemoteCommandCenter play button
I have an iOS 9 app that plays MIDI-like songs using an AudioGraph. I've set up remote control commands with MPRemoteCommandCenter and info with MPNowPlayingInfoCenter such that the currently playing song shows up in Control Center and responds to control center button presses or headphone button presses. Tapping the pause button in Control Center pauses my song, but the playhead in Control Center keeps moving and the button remains as a pause icon. Tapping it again just keeps calling pause. Is there a way to update the MPNowPlayingInfoCenter or MPRemoteCommandCenter state such that Control Center knows the song is paused?Solutions I have tried:Setting enabled on playCommand and pauseCommandhas no effectSetting MPNowPlayingInfoPropertyPlaybackRate to 0 in MPNowPlayingInfoCenterstops the playhead from advancing (and resets the elapsed time if I don't explicitly set it as well), but the button is still a pause buttonStopping my audio engine and calling AVAudioSession.setActive(false)this does seem to work, but it is slow, causes audio glitches, and other parts of my app rely on the audio engine running even if a song is paused
Topic: UI Frameworks SubTopic: UIKit Tags:
4
0
2.8k
Apr ’16