CallBack Problems when using devices other than default

Hi, Im having problems when switching to devices like ASIO or directsound.
Any ideas why this can happen? thanks rotem

This my code ---->

AudioManager = new AudioRecorderPlayer();
AudioManager->Player.setSource(testProject->GetMixer());

static AudioDeviceManager* dm;
dm = new AudioDeviceManager();
dm->setAudioCallback(AudioManager);

// List devices and pick asio
StringArray listDevices = dm->getAvailableAudioDeviceNames();
int selDevice = -1;
for (int i=0;i<listDevices.size();i++)
{
if (listDevices[i].containsIgnoreCase(String(“asio”)))
selDevice = i;
}

// this works with no asio
dm->initialise (2, 2, savedAudioState, true);

// This doesn’t
BitArray* twoChannels = new BitArray(3);
dm->setAudioDevice(listDevices[selDevice],0,0,twoChannels,twoChannels,true);

…well yes, but what actually happens? When you step through it, where does it fail?

The audioDeviceIOCallback CTOR initializes correctly and doesn’t show any any error but the callback itself isn’t called.

When changing to dm->setAudioDevice(listDevices[0],0,0,twoChannels,twoChannels,true);
the callback starts running again

Does the juce demo audio page open the same device correctly?