• 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
Audio Device Property Caching in Snow Leopard?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Audio Device Property Caching in Snow Leopard?


  • Subject: Audio Device Property Caching in Snow Leopard?
  • From: AI Developer <email@hidden>
  • Date: Thu, 22 Oct 2009 20:47:36 +0530

Hi,

Does Snow Leopard cache audio device properties, and satisfy calls from the cache?

I've run into a very wierd problem when trying to change the Sampling Rate of a device on SR.

If I set the SR, and then query the SR back, I do not get the new value - ever, as long as the application instance is running!

Here's some sample code that demonstrates the problem:

-------
err = AudioDeviceSetProperty(currentID, NULL, 0, 0,
    kAudioDevicePropertyNominalSampleRate, propSize, &srToSet);
          
if (err == kAudioHardwareNoError)
{
    Float64 currentSR = 0.0;
    propSize = sizeof (currentSR);
    err = AudioDeviceGetProperty(currentID, 0, 0, kAudioDevicePropertyNominalSampleRate, &propSize, &currentSR);
    if (err == kAudioHardwareNoError)
    {
        std::cout << "\tResultant Nominal Sampling Rate: " << (int)currentSR << " Hz.";
    }
}
-------

If srToSet is differet from the current rate, and I execute this code, the value coming out of the GetProperty is not as expected.

Note that at the same time, the SR has been changed properly (Audio MIDI Setup shows the new value as soon as the SetProperty succeeds). It's just that the process that has invoked the SetProperty shows the wrong value.

This only happens on 10.6, not on 10.5.

Am I doing something wrong here?

Thanks.
Devendra.
 _______________________________________________
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: Audio Device Property Caching in Snow Leopard?
      • From: AI Developer <email@hidden>
References: 
 >One Cocoa view for multiple AUs? (From: ipmlists <email@hidden>)

  • Prev by Date: One Cocoa view for multiple AUs?
  • Next by Date: Re: Audio devices input and output coupling
  • Previous by thread: One Cocoa view for multiple AUs?
  • Next by thread: Re: Audio Device Property Caching in Snow Leopard?
  • Index(es):
    • Date
    • Thread