• 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: >2 channel input now working with AUHAL!
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: >2 channel input now working with AUHAL!


  • Subject: Re: >2 channel input now working with AUHAL!
  • From: Doug Wyatt <email@hidden>
  • Date: Fri, 9 Jul 2004 15:10:03 -0700

Robert,

Glad you got it working!

On Jul 9, 2004, at 13:20, Robert Grant wrote:
Looking at Doug's pseudo code I spotted the difference between what we had and the right way. We weren't setting the stream to the canonical format.

I didn't think this would make a difference because I thought the least the AUHAL did for you was to translate between canonical to device formats. Certainly it does this on output. But making that change kicked the thing into life and activated the higher channels.

So what were you doing before with the output scope of element 1, which is the format in which you're going to receive data? Leaving it alone? In this case it will default to stereo & 44.1, either or both of which are not necessarily what you want ;-)

I was (foolishly I see now) ignoring all the format stuff because I just wanted to use the default canonical format and expected that to "just work"!

So can someone explain why input is not handled in the same way?

I'm looking at the code and input and output are entirely symmetrical -- flattened versions of the device stream formats are set on element 0's output and element 1's input ... I don't see any place where the client formats (element 0's input and element 1's output) are changed except to default to stereo 44.1, and in response to SetProperty.

This is looking like perhaps the single most common usage problem of the input unit (once you get past enabling it) -- if you don't set the input format, you're going to get stereo 44.1 (and if the hardware isn't at 44.1 you are going to get errors).

It might help people to remember that the output unit is also a converter unit between the hardware stream formats and a client format -- and if you don't set your client format, you're at the mercy of the defaults.

Thinking about it this way might also clarify channel maps. A channel map is always has the *destination* number of channels, saying which sources they came from. So if you set an map of 8 array elements on a converter with only two destinations, only the first 2 array elements are pertinent. In retrospect perhaps that should be a paramErr but if we change that now I imagine we'll break an app somewhere.

--
Doug Wyatt
Core Audio, Apple
_______________________________________________
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: 
 >>2 channel input now working with AUHAL! (From: Robert Grant <email@hidden>)

  • Prev by Date: Re: >2 channel input now working with AUHAL!
  • Next by Date: SetRenderCallback vs. SetInputCallback
  • Previous by thread: Re: >2 channel input now working with AUHAL!
  • Next by thread: SetRenderCallback vs. SetInputCallback
  • Index(es):
    • Date
    • Thread