• 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: DIGI001 zero channels!
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: DIGI001 zero channels!


  • Subject: Re: DIGI001 zero channels!
  • From: Ethan Funk <email@hidden>
  • Date: Mon, 7 Jun 2004 14:24:48 -0700

That was it... obvious in hind sight. It works great now, thanks.

Ethan...

On Jun 7, 2004, at 13:18, Brad Ford wrote:

Ethan,

You've got a problem with your code below. You aren't doing an AudioDeviceGetPropertyInfo call first to see how much space you need to allocate for your buffer list. This code won't work on any device that presents more than one stream, since you've only passed it an AudioBufferList that can hold one audio buffer. You need to do:

AudioBufferList bufferlistPtr = NULL;
AudioDeviceGetPropertyInfo(theDevice, 0, false, kAudioDevicePropertyStreamConfiguration, &theSize, NULL);

bufferlistPtr = malloc(theSize);

AudioDeviceGetProperty(... kAudioDevicePropertyStreamConfiguration, &theSize, bufferlistPtr);

// now iterate over all the buffers as you did below.

free(bufferlistPtr);

-Brad Ford
QuickTime Engineering

On Jun 6, 2004, at 3:13 PM, Ethan Funk wrote:

I use the following code to get a count of the Input and Output
channels available on a audio device. This code works fine for all the
devices I have tested so far except for Digidesign's DIGI001 interface.
I get a channel count of ZERO in and out. Even when the same program
is connected and playing audio through the device, I still get zero
channels counted. Is this a bug with the Digidesign driver or am I
doing something wrong in my code?

Ethan Funk

nOUTChan = 0;
theSize = sizeof(AudioBufferList);
OSerr = AudioDeviceGetProperty(
theDevice, 0, false,
kAudioDevicePropertyStreamConfiguration,
&theSize, &chanList);
if (!OSerr){
for (j=0; j < chanList.mNumberBuffers; j++)
nOUTChan = nOUTChan +
chanList.mBuffers[j].mNumberChannels;
}

nINChan = 0;
theSize = sizeof(AudioBufferList);
OSerr = AudioDeviceGetProperty(
theDevice, 0, true,
kAudioDevicePropertyStreamConfiguration,
&theSize, &chanList);
if (!OSerr){
for (j=0; j < chanList.mNumberBuffers; j++)
nINChan = nINChan +
chanList.mBuffers[j].mNumberChannels;
}
_______________________________________________
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.
_______________________________________________
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.


References: 
 >Interleaving confusion... (From: Ethan Funk <email@hidden>)
 >Re: Interleaving confusion... (From: Doug Wyatt <email@hidden>)
 >DIGI001 zero channels! (From: Ethan Funk <email@hidden>)
 >Re: DIGI001 zero channels! (From: Brad Ford <email@hidden>)

  • Prev by Date: Re: Realtime audio processing using AUHALs
  • Next by Date: Re: Digi CoreAudio 6.5 (Ted Barram)
  • Previous by thread: Re: DIGI001 zero channels!
  • Next by thread: How to get a sustained read speed under OS X
  • Index(es):
    • Date
    • Thread