Audio Queue Services and garbage device unique ids

I’m a CoreAudio beginner and I got tripped up over this one. Hopefully this post (and radar bug) will improve error reporting in future releases of Apple’s audio queue services API.

Here’s the problem: we’re supposed to use the AudioQueueSetProperty API when associating a AudioQueueRef with an AudioObject. Instead of passing the AudioDeviceID of the device, we’re supposed to pass the device unique id, a pointer to a CFStringRef.

The call to AudioQueueSetProperty will succeed regardless of the CFStringRef's value

What does that mean? That means you’ll fail later in your application if you’ve passed a bad value to AudioQueueSetProperty