• 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: getting 'kAudioDevicePropertyBufferFrameSize' may reflect invalid values
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: getting 'kAudioDevicePropertyBufferFrameSize' may reflect invalid values


  • Subject: Re: getting 'kAudioDevicePropertyBufferFrameSize' may reflect invalid values
  • From: David Zimmermann <email@hidden>
  • Date: Fri, 07 Mar 2008 11:06:50 +0100

Hi Jeff,

thanks for reply.
Here are some details.
The hardware Id like to write the driver for is a PCI audio DMA card.
The sources worked fine for another PCI card - now I changed it to hit our new hardware
specifics too.


The ring buffer size may vary but is for initial tests staticly set to 160 frames.
Thats what I publish via setNumSampleFramesPerBuffer in my IOAudioEngine subclasses initHardware.
One Engine has 2 Streams each representing one channel.


Some stream format details:

Fmt.fNumChannels = 1;
Fmt.fSampleFormat = kIOAudioStreamSampleFormatLinearPCM;
Fmt.fNumericRepresentation = kIOAudioStreamNumericRepresentationSignedInt,
Fmt.fBitDepth = 24;
Fmt.fBitWidth = 4 * 8;
Fmt.fAlignment = kIOAudioStreamAlignmentLowByte;
Fmt.fByteOrder = kIOAudioStreamByteOrderLittleEndian;
Fmt.fIsMixable = TRUE;

What I exactly experienced with HALLab is when the app gets the property 'kAudioDevicePropertyBufferFrameSize' from HAL
the answer is 512 frames (@ 44,1kHz).
Getting the property 'kAudioDevicePropertyBufferFrameSizeRange' the HAL returns Min = 10 frames Max = 60 frames.
So the size does not fit to the range.
If I start transfer know my IOProcs will be called for invalid sample positions (bigger than 160 frames).


For tests I changed the HALLab source to re-set the 'kAudioDevicePropertyBufferFrameSize' with the valid max (60 frames) to the HAL.
Now my IOProcs will be called correctly with sample positions from frame 0 to 159.


I know HALLab just represents HAL values, I know thats why the other apps won?t work.
But I dont know how to make the HAL publishing buffersizes valid to the published range and therefore valid for my ring buffer.


David.

_______________________________________________
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


  • Follow-Ups:
    • Re: getting 'kAudioDevicePropertyBufferFrameSize' may reflect invalid values
      • From: Jeff Moore <email@hidden>
  • Prev by Date: AudioUnitHosting vs CocoaAUHost
  • Next by Date: Re: AudioUnitHosting vs CocoaAUHost
  • Previous by thread: Re: getting 'kAudioDevicePropertyBufferFrameSize' may reflect invalid values
  • Next by thread: Re: getting 'kAudioDevicePropertyBufferFrameSize' may reflect invalid values
  • Index(es):
    • Date
    • Thread