[RESOLVED]Tutorial: Playing sound files and AudioDeviceSelectorComponent


I wasn’t familiar with the AudioAppComponent class so was checking out the Playing sound files tutorial… but my attempt to add the Audio Settings dialog has resulted in distortion when changing the device and I get distorted audio from both devices (built-in and Apogee Groove) at the same time when attempting playback.

Has anyone added AudioDeviceSelectorComponent to the tutorial?

I looked to the JUCE Host (which doesn’t use AudioAppComponent ) for inspiration and have:

void MainContentComponent::showSettings()
    AudioDeviceSelectorComponent audioSettingsComp (deviceManager,
                                                    2, 2,
                                                    2, 2,
                                                    false, false, true, true);
    audioSettingsComp.setSize (500, 450);
    DialogWindow::LaunchOptions o;
    o.content.setNonOwned (&audioSettingsComp);
    o.dialogTitle                   = "Audio Settings";
    o.componentToCentreAround       = this;
    o.dialogBackgroundColour        = Colours::lightgrey;
    o.escapeKeyTriggersCloseButton  = true;
    o.useNativeTitleBar             = true;
    o.resizable                     = false;