Re: Slow growth of latency in AudioUnit render callbacks

2019-04-24 Thread Matt Ingalls
> > You mentioned copying the data over in a single IO callback - I'm not quite > sure what you meant by that? Would I just setup an input callback and send > the incoming samples directly to the output device? yes, except you are using the aggregate, so you are only dealing with that one devi

Re: Slow growth of latency in AudioUnit render callbacks

2019-04-18 Thread Matt Ingalls
if i remember correctly, that sends audio from one device to another? and there’s no compensation in that code for clock drift? i would instead use an aggregate device (created in Audio MIDI Setup, or you can do it programmatically with a little pain) with both devices, enabling drift correction

Re: Decoding compressed audio to LPCM

2018-07-02 Thread Matt Ingalls
I do exactly that (in Obj-C) with AAC files and the AVAudioPCMBuffer’s floatChannelData is indeed raw PCM data. > On Jul 2, 2018, at 1:36 PM, Waverly Edwards wrote: > > Would someone provide guidance on how I can decompress M4A and AAC files into > memory as raw LPCM. > I need to decompress M

Re: Any system calls OK to use in audio thread?

2018-02-27 Thread Matt Ingalls
king on Apple platforms: > > https://opensource.apple.com/source/xnu/xnu-2050.18.24/libsyscall/wrappers/memcpy.c > > <https://opensource.apple.com/source/xnu/xnu-2050.18.24/libsyscall/wrappers/memcpy.c> > > - Sophia > > >> On Feb 27, 2018, at 12:00 PM, Ma

Re: Any system calls OK to use in audio thread?

2018-02-27 Thread Matt Ingalls
OK thanks > I would be very surprised if memcpy() were on a list of functions that lock. Yeah me too, but I wanted to be absolutely sure. Even googling “memcpy thread safe” came up with a(n unverified) comment that it IS on Solaris, which probably means it takes a mutex, right? Perhaps my quest

Any system calls OK to use in audio thread?

2018-02-26 Thread Matt Ingalls
I have to admit that in the past i’ve done some dubious things inside the audio thread -- and i’m not proud of it.. ;) But in some recent C++ work, I'm not letting myself call any function I’m not absolutely sure is lock-free. Ross Bencina’s article is still my go-to-reference: http://www.rossb

Re: iOS : ExtAudioFileWriteAsync alternatives / Audio Queue Services availability?

2018-02-14 Thread Matt Ingalls
IOThread! Can’t figure out why… . > > Hint that can help: I am recording two live streams (stereo) at the same time > (i.e. two audio files). > > Any hints? > >> On 14 Feb 2018, at 19:01, Matt Ingalls wrote: >> >> Have you tried AVAudioFile? >> >>

Re: iOS : ExtAudioFileWriteAsync alternatives / Audio Queue Services availability?

2018-02-14 Thread Matt Ingalls
Have you tried AVAudioFile? > On Feb 13, 2018, at 12:59 PM, Arshia Cont wrote: > > Hello list, > > This is my first post here so sorry if this is already asked! > > We have been using ExtAudioFileWriteAsync on iOS successfully to write two > PCM Audio Streams to disk. We have been getting rep

seeking with AVAudioPlayerNode

2015-11-06 Thread matt ingalls
is there a way to change the frame position of a playing AVAudioPlayerNode? the only thing i have found that works is stop the node, reschedule with the new frame position, and restart the node. generating more clicks & dropouts than i want when i scrubbing through the file... thanks, matt ___

Re: Show stopper problem with touch handling that can affect core audio apps in iOS 9.0 - 9.02 on iPad Air 2

2015-10-03 Thread matt ingalls
curious if you tried turning off multitasking gestures? > On Oct 2, 2015, at 11:32 AM, moForte Business Development > wrote: > > Here are a couple videos that demonstrate the problem using Garage Band. The > lost touches issue for iPad Air 2/iOS 9 is independent of app. It can be > demonst

Re: Detect built-in input's input volume

2014-12-16 Thread matt ingalls
maybe something along these lines? // get input device AudioObjectID inputDevice; UInt32 size; AudioObjectPropertyAddress add = {kAudioHardwarePropertyDefaultInputDevice, kAudioObjectPropertyScopeGlobal,, kAudioObjectPropertyElementMaster}; AudioObjectGetPropertyDataSize(kAud

Re: Play sound on MIDI event, AUSampler?

2014-12-07 Thread matt ingalls
you can also use a soundfont with an AUSampler, which is VERY easy — you just pass the url of the sound font file when setting the kAUSamplerProperty_LoadPresetFromBank property. here’s another thing i came across recently that might be useful: i was using a high priority real-time thread for