Does Digital Performer cope if you change the audio settings from other programs, Audio MIDI Setup, REAPER, Logic etc? This may be an issue with Digital Performer itself, rather than something you can work around.
hi @reuk - upon further investigation, this appears to be caused by trying to change the sample rate to 48k, when Digital Performer is open with a 96k projects and the computer is attached to my MOTU 896 mkIII audio interface, which is set to 96k.
It happens with the AudioPluginHost as well, so it’s indeed a DP issue.
But I wonder is there some way to query the current sample rate (before initializing the AudioDeviceManager) and not change it if it’s in use by somebody else, or something…?
I’ve seen other issues with instantiating an app that uses a device that is already in use by another app/host, such as the sample rate changing underneath you in that other app/host. You can, for instance, attach to an audio device in a host, have it running, then go to the system settings for that device and change its sample rate. That will break the running app. In DPs case, they detect that and throw the error. In other cases, you might just suddenly be playing back at the wrong sample rate. (That’s what happens with the app I’m working on now.)
Yeah, upon further reflection I’ve decided I’m over-thinking this. If the user wants to change the sample rate while another app is open, or launches your app with a saved sample rate that is different from another app that is currently running, then the user must deal with the ramifications.