Thank you again for your help!
I was able to get the program to compile, but the replacement methodolgy I came up with for Initializing the sound drivers is currently failing to find the actual important hardware drivers.
The old methodology (for JUCE 1.45) was:
[code]{
motuIndex = -1;
const String error (audioDeviceManager.initialise (0, /* number of input channels /
12, / number of output channels /
0, / no XML settings… /
true / select default device on failure */));
if (error.isNotEmpty())
{
AlertWindow::showMessageBox (AlertWindow::WarningIcon,
T("Audio Demo"),
T("Couldn't open an output device!\n\n") + error);
}
else
{
int blockSize = -1;
double sampleRate = 44100.0;
BitArray inputChannels;
BitArray outputChannels;
outputChannels.clear();
outputChannels.setRange(0, 12, true);
const StringArray audioDeviceNames = audioDeviceManager.getAvailableAudioDeviceNames();
for (int i=0; i < audioDeviceNames.size();i++) {
// AlertWindow::showMessageBox (AlertWindow::WarningIcon, T(“ASIO Device List”), audioDeviceNames[i]);
if (audioDeviceNames[i].contains(T(“MOTU Audio ASIO”)) || audioDeviceNames[i].contains(T(“MOTU PCI ASIO”))) {
motuIndex = i;
break;
}
}
if (motuIndex >= 0) {
const String error (audioDeviceManager.setAudioDevice(audioDeviceNames[motuIndex], blockSize, sampleRate, &inputChannels, &outputChannels, false));
if (error.isNotEmpty()) {
AlertWindow::showMessageBox (AlertWindow::WarningIcon,
T("Audio Demo"),
T("MOTU Device not available. (Is it unplugged? Turned off?) Fallback: Stereo PC Speakers"));
outputChannels.clear();
outputChannels.setRange(0, 2, true);
audioDeviceManager.setAudioDevice(audioDeviceNames[0], blockSize, sampleRate, &inputChannels, &outputChannels, false);
motuIndex = -1;
simSound.SetStereoOutputFlag(true);
}
else {
simSound.SetStereoOutputFlag(false);
}
}
else {
AlertWindow::showMessageBox (AlertWindow::WarningIcon,
T("Audio Demo"),
T("No ASIO Drivers detected. Fallback: Using Stereo Field as output."));
outputChannels.clear();
outputChannels.setRange(0, 2, true);
audioDeviceManager.setAudioDevice(audioDeviceNames[0], blockSize, sampleRate, &inputChannels, &outputChannels, false);
motuIndex = -1;
simSound.SetStereoOutputFlag(true);
}
// start the IO device pulling its data from our callback..
audioDeviceManager.setAudioCallback (this);
addAndMakeVisible (tabs = new TabComponent (simSound));
}
}[/code]
Of course lookign at this in full just now I notice the old methodology called audioDeviceManager.initialise() as well…
In my haste to get something compiling ASAP I came up with:
[code]motuIndex = -1;
const String error (audioDeviceManager.initialise (0, /* number of input channels /
12, / number of output channels /
0, / no XML settings… /
true / select default device on failure */));
if (error.isNotEmpty())
{
AlertWindow::showMessageBox (AlertWindow::WarningIcon,
T("Audio Demo"),
T("Couldn't open an output device!\n\n") + error);
}
else
{
int blockSize = -1;
double sampleRate = 44100.0;
BitArray inputChannels;
BitArray outputChannels;
outputChannels.clear();
outputChannels.setRange(0, 12, true);
/* New methods needed in order to compile with JUCE 1.51 instead of 1.45 */
OwnedArray <AudioIODeviceType> types;
StringArray fullArray;
audioDeviceManager.createAudioDeviceTypes (types);
for (int i = 0; i < types.size(); ++i)
{
String typeName (types[i]->getTypeName()); // This will be things like "DirectSound", "CoreAudio", etc.
types[i]->scanForDevices(); // This must be called before getting the list of devices
StringArray deviceNames (types[i]->getDeviceNames()); // This will now return a list of available devices of this type
fullArray.addArray(deviceNames, 0, deviceNames.size());
}
const StringArray audioDeviceNames = fullArray;
for (int i=0; i < audioDeviceNames.size();i++) {
// AlertWindow::showMessageBox (AlertWindow::WarningIcon, T(“ASIO Device List”), audioDeviceNames[i]);
if (audioDeviceNames[i].contains(T(“MOTU Audio ASIO”)) || audioDeviceNames[i].contains(T(“MOTU PCI ASIO”))) {
motuIndex = i;
break;
}
}
if (motuIndex >= 0) {
//const String error (audioDeviceManager.setAudioDevice(audioDeviceNames[motuIndex], blockSize, sampleRate, &inputChannels, &outputChannels, false));
const String error (audioDeviceManager.initialise(1, 1, 0, true, audioDeviceNames[motuIndex], 0));
if (error.isNotEmpty()) {
AlertWindow::showMessageBox (AlertWindow::WarningIcon,
T("Audio Demo"),
T("MOTU Device not available. (Is it unplugged? Turned off?) Fallback: Stereo PC Speakers"));
outputChannels.clear();
outputChannels.setRange(0, 2, true);
//audioDeviceManager.setAudioDevice(audioDeviceNames[0], blockSize, sampleRate, &inputChannels, &outputChannels, false);
audioDeviceManager.initialise(1, 1, 0, true, audioDeviceNames[0], 0);
motuIndex = -1;
simSound.SetStereoOutputFlag(true);
}
else {
simSound.SetStereoOutputFlag(false);
}
}
else {
AlertWindow::showMessageBox (AlertWindow::WarningIcon,
T("Audio Demo"),
T("No ASIO Drivers detected. Fallback: Using Stereo Field as output."));
outputChannels.clear();
outputChannels.setRange(0, 2, true);
//audioDeviceManager.setAudioDevice(audioDeviceNames[0], blockSize, sampleRate, &inputChannels, &outputChannels, false);
audioDeviceManager.initialise(1, 1, 0, true, audioDeviceNames[0], 0);
motuIndex = -1;
simSound.SetStereoOutputFlag(true);
}
// start the IO device pulling its data from our callback..
//audioDeviceManager.setAudioCallback(this);
audioDeviceManager.addAudioCallback(this);
addAndMakeVisible (tabs = new TabComponent (simSound));
}
}[/code]
I’m sure that I’m doing much of this inefficiently and down-right erroneously. So I apologize in advance for my complete ignorance of your API.