• 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: HAL plugin I/O format
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: HAL plugin I/O format


  • Subject: Re: HAL plugin I/O format
  • From: Jeff Moore <email@hidden>
  • Date: Tue, 06 Jan 2009 12:39:21 -0800


On Dec 16, 2008, at 7:27 AM, Mike Kluev wrote:

Inside HAL plugin's CallIOProcs / PostProcessInputData / PreProcessOutputData:
am I restricted to "interleaved stereo + float" sample format?

That is entirely up to your driver. The only catch is that, for linear PCM data, apps expect that the virtual format is going to be some number of channels of Float32 samples. If you want to work internally in another format, then you need to write code that converts the Float32 samples into that format.


That said, if you really must have apps deliver the data to your driver in something other than Float32 samples (which would curtail the ability of your driver to work with apps), it is possible but you would need to modify how HP_FormatList works (specifically, the AddPhysicalFormat method).


If not, how to change
it to, say, "mono + int"?

Plugin's AddAvailablePhysicalFormats reports only "int" formats (unmodified
from the SampleHardwarePlugin sample). The host app's output format (the
client of HAL plugin) doesn't seem to be relevant: no matter what I set it to I always
have to deal with stereo floats inside HAL plugin internals.

It sounds to me like you aren't setting up the available formats correctly. Otherwise, you would be able to see all the formats and select the one you want using HALLab. Can you do this much?


--

Jeff Moore
Core Audio
Apple


_______________________________________________ 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: Re: Speeding HAL plugin loop rate
  • Next by Date: Re: Audio buffers in user-land audio driver
  • Previous by thread: Re: Speeding HAL plugin loop rate
  • Next by thread: Re: Audio buffers in user-land audio driver
  • Index(es):
    • Date
    • Thread