• 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
AudioQueue input device seems to be auto switching...
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

AudioQueue input device seems to be auto switching...


  • Subject: AudioQueue input device seems to be auto switching...
  • From: Neil Clayton <email@hidden>
  • Date: Tue, 4 Dec 2007 08:47:01 +1300

Hi,

I've just been experimenting (learning) about AudioQueues, and have my own version of AQRecord going. All good.
It records OK, both CBT/AAC - as expected.


I've been playing around now with recording specific devices. My queue setup is thus (error handling removed):

- (void) setupQueue {
OSStatus err = AudioQueueNewInput(&description, HandleInputBuffer, self, nil, kCFRunLoopCommonModes, 0, &queue);

// Setup the device being used
if(device) {
[self log:@"Using device %@ as the source", device];
CFStringRef deviceUID = (CFStringRef)[device.device deviceUID];
err = AudioQueueSetProperty(queue, kAudioQueueProperty_CurrentDevice, &deviceUID, sizeof(CFStringRef));
}

// Now reget the AudioStreamBasicDescription in order to make sure it's properly filled out
UInt32 size = sizeof(description);
err = AudioQueueGetProperty(queue, kAudioConverterCurrentOutputStreamDescription, &description, &size);
}



This works OK, but if I then change the default input device, AQ appears to make attempts to follow it. I see a brief (perhaps 5s) pause while it matches the device, and then it continues recording. The final result is a somewhat garbled audio file since the devices I'm switching between all have different formats (so I end up sounding like a certain disney mouse!).


As far as I know I've not setup the recording device to be "default", and no err is returned from setting kAudioQueueProperty_CurrentDevice.

Is this intended behavior?  And if so, how do I disable it?

--
Regards,
Neil Clayton,  http://shinywhitebox.com






_______________________________________________ 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:
    • auval complaining on all runs?
      • From: "Kevin Dixon" <email@hidden>
  • Prev by Date: Re: Problems when changing sample rate on a aggregate device (OSX 10.5.1)
  • Next by Date: auval complaining on all runs?
  • Previous by thread: Re: Problems when changing sample rate on a aggregate device (OSX 10.5.1)
  • Next by thread: auval complaining on all runs?
  • Index(es):
    • Date
    • Thread