• 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: what would cause QTSetComponentProperty to fail with a kAudioUnitErr_InvalidPropertyValue err?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: what would cause QTSetComponentProperty to fail with a kAudioUnitErr_InvalidPropertyValue err?


  • Subject: Re: what would cause QTSetComponentProperty to fail with a kAudioUnitErr_InvalidPropertyValue err?
  • From: Michael Dautermann <email@hidden>
  • Date: Wed, 14 Mar 2007 04:14:13 -0700

On Mar 12, 2007, at 4:54 PM, Brad Ford wrote:

When I try to set the Sequence Grabber in my application to pick it up (via QTSetComponentProperty, using the same format as WhackedTV):

err = [self setPropertyWithClass: kQTPropertyClass_SGAudioRecordDevice id: kQTSGAudioPropertyID_DeviceUID size: sizeof(uid) address: &uid];

this fails with a kAudioUnitErr_InvalidPropertyValue.

Does your device have input streams? Setting the above property will fail if the device is not capable of capturing audio. The Sequence Grabber determines this by querying it for its streams on the input side.



Hi Brad (and anyone else who knows Audio Hardware Plugins),

My device does indeed have input streams. I claim audio stream IDs in my plugin's Initialize function, mark them created, and when I attempt to select my audio plugin using the Sequence Grabber, I see a number of things firing within the plugin.

When our app does the QTSetComponentProperty call, here is the order of what I see firing in my plug-in:

DeviceGetProperty: muid
DeviceGetProperty: uid
DeviceGetProperty: lnam
DeviceGetProperty: livn (I list my device as alive)
DeviceGetProperty: slay (this call is asking about my two input channels, L&R, and I return an AudioBufferList for each of those channels)
DeviceGetProperty: slay (this call asks for stream information about output channels, for which I have zero)
DeviceGetProperty: oink
DeviceGetProperty: slay (my input channels are being queried again)
DeviceGetProperty: thru
DeviceGetProperty: stm# (I set the stream list returned to the IDs created in my initialize function)
StreamGetProperty: sfmt (one for channel 0 of the first stream ID, this would be the left channel of my device)
StreamGetProperty: sfmt (the second stream ID; this would be the right channel of my device)


It's after these last StreamGetProperty calls (with the kAudioDevicePropertyStreamFormat property id) that QTSetComponentProperty returns the error of -10851.

In the AudioBufferList structures I am returning from the DeviceGetProperty calls, I set mNumberBuffers to 2 channels, mNumberChannels to 1, mDataByteSize to 512 bytes * sizeof( float ), and mData to NULL.

Once the processing callback actually starts up, I'll have a separate AudioBufferList to handle the data being sent over by my device.

Is there something else the sequence grabber might be looking for after that long sanity check of the stream? does there need to be data (or something that's not null) in the mData fields of the AudioBufferList?

If this is getting a little too in depth or esoteric, let me know and I can take it over to DTS.

thanks,

michael

_______________________________________________
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: what would cause QTSetComponentProperty to fail with a kAudioUnitErr_InvalidPropertyValue err?
      • From: Jeff Moore <email@hidden>
References: 
 >what would cause QTSetComponentProperty to fail with a kAudioUnitErr_InvalidPropertyValue err? (From: Michael Dautermann <email@hidden>)
 >Re: what would cause QTSetComponentProperty to fail with a kAudioUnitErr_InvalidPropertyValue err? (From: Brad Ford <email@hidden>)

  • Prev by Date: Re: Bug in CoreMIDI Causes Massive Audio Overload?
  • Next by Date: Writing MIDI driver based on SampleUSBMIDI Driver code
  • Previous by thread: Re: what would cause QTSetComponentProperty to fail with a kAudioUnitErr_InvalidPropertyValue err?
  • Next by thread: Re: what would cause QTSetComponentProperty to fail with a kAudioUnitErr_InvalidPropertyValue err?
  • Index(es):
    • Date
    • Thread