• 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: kAudioDevicePropertyStreamFormat error on Tiger
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: kAudioDevicePropertyStreamFormat error on Tiger


  • Subject: Re: kAudioDevicePropertyStreamFormat error on Tiger
  • From: Jeff Moore <email@hidden>
  • Date: Wed, 16 Nov 2005 11:28:42 -0800

A quick test with the devices I have on hand, show that I can't reproduce the problem. It's entirely possible that the format is being rejected by the hardware itself, possibly due to bandwidth usage issues. I don't have the specific device on hand to test with, so it's hard to say.

At any rate, kAudioDevicePropertyStreamFormatMatch is one of the properties that has been unofficially deprecated for quite some time (you can see this most clearly in the Tiger version of CoreAudio/ AudioHardware.h where this is called out specifically). You should not be using it. The right thing to do is to get the list of available formats and iterate through it to find the format you are interested in.

Also, applications should not be changing the hardware format to begin with. Settings belong to the user and for hardware, global to the entire system. Applications should not be changing settings willy nilly. That's why the system ships with AMS. Of course, there are exceptions (like when an app wants to deal with sending encoded data to the hardware), but they are relatively few and far between.

On Nov 15, 2005, at 7:53 PM, Dominic Feira wrote:

Hello. I received a bug report recently on my app regarding a particular USB audio input/output device from 2 separate users. It seems that after updating to 10.4.3 it no longer works correctly. The device in question is the ADS Tech RDX-150-EF that is available at CompUSA. I picked one of these up for testing and can confirm the report.

I can not confirm that it worked on 10.4.2. I do not have a 10.4.2 machine to test it on. I can however confirm that it works properly under Panther. The device shows up as USB Audio Codec in both Panther and Tiger, which I'm assuming is some generic USB audio driver.

Here is a snippet of code that errors with this device on 10.4.3

bestMatch before:
  Sample Rate:44100.000000	Format ID:lpcm
  Format Flags:0			Bytes per Packet:8
  Frames per Packet:1		Bytes per Frame:8
  Channels per Frame:2		Bits per Channel:32
  Reserved: 0

qThrowIfError(AudioDeviceGetProperty(in, 0, TRUE, kAudioDevicePropertyStreamFormatMatch,
&size, &bestMatch), "AudioDeviceGetProperty");
bestMatch after:
Sample Rate:44100.000000 Format ID:lpcm
Format Flags:B Bytes per Packet:8
Frames per Packet:1 Bytes per Frame:8
Channels per Frame:2 Bits per Channel:32
Reserved: 707406378 // on Panther this is 570434084



qThrowIfError(AudioDeviceSetProperty(in, 0, 0, TRUE, kAudioDevicePropertyStreamFormat,
sizeof(AudioStreamBasicDescription),
&bestMatch), "AudioDeviceSetProperty");


This throws: '!dat' == kAudioDeviceUnsupportedFormatError. How can a device not support the format that was just returned by kAudioDevicePropertyStreamFormatMatch? Again, this works correctly under Panther.


--

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
  • Follow-Ups:
    • Format Info and the HAL (was Re: kAudioDevicePropertyStreamFormat error on Tiger)
      • From: Jeff Moore <email@hidden>
References: 
 >kAudioDevicePropertyStreamFormat error on Tiger (From: Dominic Feira <email@hidden>)

  • Prev by Date: Re: Datasources and digital audio output
  • Next by Date: Re: Datasources and digital audio output
  • Previous by thread: kAudioDevicePropertyStreamFormat error on Tiger
  • Next by thread: Format Info and the HAL (was Re: kAudioDevicePropertyStreamFormat error on Tiger)
  • Index(es):
    • Date
    • Thread