• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Supplying two buffers to AU, but only getting one back.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Supplying two buffers to AU, but only getting one back.


  • Subject: Supplying two buffers to AU, but only getting one back.
  • From: Michael Norris <email@hidden>
  • Date: Wed, 08 May 2019 09:23:20 +0000
  • Thread-topic: Supplying two buffers to AU, but only getting one back.

Hi there

I’m writing a small AU host that takes incoming audio and processes it with the
selected AU. This works fine on most AUs, but for one AU I recently purchased
(which works fine in other hosts) I only seem to be returned 1 buffer when I
gave it 2. The effect doesn’t have any stereo->mono mixdown as far as I can see.

I’m supplying two buffers of non-interleaved linear PCM Float32s in an
AudioBufferList to the render callback. In return, I believe I should receive
two buffers in the callback with the effected audio data in it. However, I only
get one buffer, not two. Other AU hosts get stereo data out of this AU, so I’m
not sure what I’m doing wrong.

Below is some condensed code to show the main steps. I’d appreciate any insight
into what I’m doing wrong, or what I’m misunderstanding.

// ** INITIALIZE AU HERE ** //
input.inputProc = (AURenderCallback) ao_coreaudio_render_proc;
result = AudioUnitSetProperty (audioUnit, kAudioUnitProperty_SetRenderCallback,
 kAudioUnitScope_Input,   0, &input, sizeof(input));

// ** DEFINE BUFFER LISTS

kNumChannels = 2;
audioBufferList = (AudioBufferList *) malloc (sizeof (AudioBufferList) + sizeof
(AudioBuffer)*(kNumChannels-1));
audioBufferList->mNumberBuffers = kNumChannels;
for (i = 0; i < kNumChannels; i++) {
x->audioBufferList->mBuffers[i].mNumberChannels  = 1;
}

// ** PROCESS INCOMING AUDIO

result = AudioUnitRender(audioUnit, &actionFlags, &myTimeStamp, 0,
(UInt32)sampleframes, audioBufferList);

// IN THE RENDER CALLBACK, THE FOLLOWING ERROR GETS TRIPPED FOR ONE PARTICULAR
AU

static OSStatus ao_coreaudio_render_proc (void *inRefCon,
                                          AudioUnitRenderActionFlags
*ioActionFlags,
                                          const AudioTimeStamp *inTimeStamp,
                                          UInt32 inBusNumber,
                                          UInt32 inNumberFrames,
                                          AudioBufferList * ioData) {

if (ioData->mNumberBuffers == 1) {
// ERROR — THIS SHOULD BE 2, not 1
}



————————————————
Associate Professor MICHAEL NORRIS
Programme Director, Composition & Sonic Art
Editor, Wai-te-ata Music Press
Artistic Co-Director, Stroma New Music Ensemble
Developer, ‘SoundMagic Spectral’ and ‘spindrift’ audio software
New Zealand School of Music | Te Kōkī
Victoria University of Wellington  | Te Whare Wānanga o te Ūpoko o te Ika a Māui
PO Box 600, Wellington
NEW ZEALAND | AOTEAROA

ph: +64 4 463 7456
mob: +64 21 211 0138
web: www.michaelnorris.info<http://www.michaelnorris.info> |
www.stroma.co.nz<http://www.stroma.co.nz> |
www.waiteatamusicpress.co.nz<http://www.waiteatamusicpress.co.nz> |
www.nzsm.ac.nz<http://www.nzsm.ac.nz>








 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Prev by Date: AUv3 - Logic X Pro Side Chain enable crash
  • Next by Date: Plugins (AU...) using OpenGL are "invisible" when used on Mojave build host
  • Previous by thread: AUv3 - Logic X Pro Side Chain enable crash
  • Next by thread: Plugins (AU...) using OpenGL are "invisible" when used on Mojave build host
  • Index(es):
    • Date
    • Thread