But when I load it back in, it only sets the device name and type. Sample rate and buffer size all get reset to default. Any idea what’s going on? I’ve follow the code into juce and does grab them from the xml with these lines
Never mind I appear to need to create a new AudioDeviceManager because the one in MainContentComponent() called ‘deviceManager’ doesn’t allow a re-initialise. I find this all slightly confusing, but I guess it’ll make sense at some point.
On the other hand, the audio device can be changed from outside. Some apps could react when you change the samplerate with changing it back, and similar annoyances. For that purpose you have the changeMessages from the DeviceManager to react to.
Excellent thanks. Yes I have a deviceManager in AudioAppComponent. I’ve switched it back in and magically it appears to work now(!!!) I swear the file was being changed but the setting weren’t loading in. I’ll leave it now. I’m not using setAudioChannels I’m using straight deviceManager.initialise. I didn’t know the other existed. I’ll use the one in the AudioAppComponent now like you suggest.
Thanks again,
Dave H.