Change sample rate in AudioAppComponent: 44.1kHz to 48kHz is OK, but 44.1kHz to 11.025kHz doesn't work


#1

Hi,

I'm trying to change the sample rate in an AudioAppComponent. The change from 44100Hz to 48000Hz seems to work, but I am not able to change from 44100Hz to 11025Hz. My code:

 


class MainContentComponent   : public AudioAppComponent,
{
public:
    //==============================================================================
    MainContentComponent()
    {
        setAudioChannels (2, 2);
        AudioDeviceManager::AudioDeviceSetup adsetup;
        deviceManager.getAudioDeviceSetup(adsetup);
        adsetup.bufferSize = 512;
        adsetup.sampleRate = 11025;
        deviceManager.setAudioDeviceSetup(adsetup, true);
        setSize (800, 600);

    }

Any advice?

Thanks.


#2

Presumably the device doesn't support that rate.