• 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
Re: AU diagnostics?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: AU diagnostics?


  • Subject: Re: AU diagnostics?
  • From: Bill Stewart <email@hidden>
  • Date: Mon, 24 Feb 2003 18:28:17 -0800

I see your problem...

An AudioStreamBasicDescription is an ABSTRACT or META representation of the format...

So, firstly you describe how many channels in your stream:
mChannelsPerFrame = nChannels

OK - so far we're consistent..

The following fields describe ONE of the buffers that are contained in the AudioBufferList (regardless of how many actual buffers or channels (the two are equivalent in this case) in that list:

mFramesPerPacket = 1
mBitsPerChannel = 32 (because it is Float32 data)
mBytesPerFrame = 4 //ie. sizeof(Float32)
mBytesPerPacket = 4

ie. Each Buffer in the list has PCM data which has 1 frame per packet, each channel (of which there is 1 only in each buffer) is 32bits deep, There is (BY DEFINITION) 1 PCM frame of data in a PCM "packet", thus there are 4 bytes per frame and 4 bytes per packet (so bytesPerPacket = mFramesPerPacket * mBytesPerFrame)

Have a look in PublicUtilities/CAAudioStreamBasicDescription

That has a couple of calls to set one of these up (including a call which will take a number of channels and construct this for you)

So - what you are getting from the Emagic SDK is wrong.

Bill

On Friday, February 21, 2003, at 06:41 AM, Angus F. Hewlett wrote:

OK, I've tracked it down somewhat... the reason render() never gets called
is that AUGraphInitialize is failing with error code
-10868(kAudioUnitErr_FormatNotSupported). The AUGraph reports this error
after calling GetStreamFormat via the dispatcher.

My GetStreamFormat code (courtesy of Emagic) looks like this:-


//
----------------------------------------------------------------------- ------
const CAStreamBasicDescription&
CVST2AUPlugin::GetStreamFormat(AudioUnitScope iScope, AudioUnitElement)
{
static CAStreamBasicDescription sDesc;
sDesc.mSampleRate = m_r64Samplerate;
sDesc.mFormatID = kAudioFormatLinearPCM;
sDesc.mFormatFlags = (kAudioFormatFlagsNativeFloatPacked |
kAudioFormatFlagIsNonInterleaved);
sDesc.mBytesPerPacket = m_lFramesPerSlice*4;
sDesc.mFramesPerPacket = m_lFramesPerSlice;
sDesc.mBytesPerFrame = 4;
sDesc.mChannelsPerFrame =
(iScope==kAudioUnitScope_Input?s_pcInfo.NumInputs():s_pcInfo.NumOutputs ());
sDesc.mBitsPerChannel = 32;

return sDesc;
}

m_r64Samplerate is initialized to 44100, and m_lFramesPerSlice to 1024.
NumOutputs is 2, NumInputs most likely 0 (is that a problem? Should even a
synth AU declare 2 inputs?)

Regards,
Angus.




At 04:27 PM 2/20/2003 -0800, Bill Stewart wrote:
You can run AudioUnitHosting (in the CoreAudio SDK) in a mode where
synths will be loaded and MIDI input is received from the first MIDI
Endpoint in the system - its a bit "grungy" (technical term) - but it
does work and is a good way to validate synths

Bill

On Wednesday, February 19, 2003, at 06:04 AM, Angus F. Hewlett wrote:

At 02:56 PM 2/19/2003 +0100, you wrote:
Hmm,

my problems have been somewhat similar when I started...

I can't recall the solution, but do you return true on
yoursynth::StreamFormatWritable(...) ?

Yes.

Does Render() not even get called once?

Not even once in Rax or Synthtest... but works fine in LAP6 prerelease.


=======================================================
Angus F. Hewlett, Technical Director
FXpansion Audio UK Ltd - http://www.fxpansion.com
=======================================================
_______________________________________________
coreaudio-api mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/coreaudio-api
Do not post admin requests to the list. They will be ignored.


-- mailto:email@hidden
tel: +1 408 974 4056

______________________________________________________________________ __
__
"Much human ingenuity has gone into finding the ultimate Before.
The current state of knowledge can be summarized thus:
In the beginning, there was nothing, which exploded" - Terry Pratchett
______________________________________________________________________ __
__
_______________________________________________
coreaudio-api mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/coreaudio-api
Do not post admin requests to the list. They will be ignored.

=======================================================
Angus F. Hewlett, Technical Director
FXpansion Audio UK Ltd - http://www.fxpansion.com
=======================================================
_______________________________________________
coreaudio-api mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/coreaudio-api
Do not post admin requests to the list. They will be ignored.


--
mailto:email@hidden
tel: +1 408 974 4056

________________________________________________________________________ __
"Much human ingenuity has gone into finding the ultimate Before.
The current state of knowledge can be summarized thus:
In the beginning, there was nothing, which exploded" - Terry Pratchett
________________________________________________________________________ __
_______________________________________________
coreaudio-api mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/coreaudio-api
Do not post admin requests to the list. They will be ignored.
  • Follow-Ups:
    • Re: AU diagnostics?
      • From: "Angus F. Hewlett" <email@hidden>
References: 
 >Re: AU diagnostics? (From: "Angus F. Hewlett" <email@hidden>)

  • Prev by Date: Re: Timing & Callbacks
  • Next by Date: Re: Idle processing
  • Previous by thread: Re: AU diagnostics?
  • Next by thread: Re: AU diagnostics?
  • Index(es):
    • Date
    • Thread