• 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
Custom formats in CoreAudio
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Custom formats in CoreAudio


  • Subject: Custom formats in CoreAudio
  • From: Eugene Gavrilov <email@hidden>
  • Date: Thu, 14 Apr 2011 15:16:48 +0400

Hello,

I am currently developing a driver for a piece of hardware, which supports non-standard audio stream (it is not lpcm, ac-3, etc).
Our custom driver publishes audio formats by calling IOAudioStream::addAvailableFormat.
The format has our own kIOAudioStreamSampleFormat constant, and also our own kIOAudioStreamNumericRepresentation constant.
It seems that CoreAudio fails to work correctly with such formats (I'm currently using 10.6.7): it reports to (our custom) audio player that minimal and maximal buffer sizes are 1.
(The driver specifies buffer sizes properly).

If I change our own kIOAudioStreamSampleFormat constant to some other "known" value (e.g. 'lpcm' or 'cac3'), everything is working fine, and the player can get/set buffer size properly (by reading/setting kAudioDevicePropertyBufferFrameSizeRange and kAudioDevicePropertyBufferFrameSize properties).

If I change our proprietary kIOAudioStreamNumericRepresentation constant to kIOAudioStreamNumericRepresentationSignedInt, this does not solve the issue.

One more observation: when non-standard audio format is selected by the driver or player, "Audio MIDI Setup" utility behaves very strangely: it fails to update sampling rate; and sometimes choosing the other device (e.g. "Built-in Output") on the left, will not update settings on the right. If I change kIOAudioStreamSampleFormat back to 'lpcm', A/M Setup works properly with the same device/driver. (It used to simply hang-up in 10.6.6).

Are these known limitations of the CoreAudio architecture? Is there a way to specify kIOAudioStreamNumericRepresentation on the API level when requesting physical/virtual format change? Is there a way to fix the problem with incorrect buffer size calculations? I checked IOAudioDevice/IOAudioEngine/IOAudioStream source code and found no explicit checks for audio format, so I suspect this check happens somewhere in coreaudiod or similar user-level component, which is not open-source.

Thank you for any hints and advice.

--
Regards,
 Eugene Gavrilov
 Senior Software Engineer
 CEntrance, Inc.

 _______________________________________________
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: Strange crash report for jackdmp
  • Next by Date: kMusicDeviceProperty_SoundBankFSSpec
  • Previous by thread: Strange crash report for jackdmp
  • Next by thread: kMusicDeviceProperty_SoundBankFSSpec
  • Index(es):
    • Date
    • Thread