I converted some wav files to the oggVorbis format in hopes to load less into ram at runtime with the sampler.
[code]for(int s = 0; s < 66; s++)
{
BitArray samplerNotes;
OggVorbisAudioFormat oggFormat;
AudioFormatReader* audioReader;
int i;
for (i = sampleInfo[s].LoKey - 1; i < sampleInfo[s].HiKey; ++i)
{
samplerNotes.setBit (i);
}
audioReader = oggFormat.createReaderFor(new MemoryInputStream (sampleInfo[s].SoundSource,sampleInfo[s].SoundSize,false),true);
synth.addSound (new SamplerSound (T("demo sound"),
*audioReader,
samplerNotes,
sampleInfo[s].RootKey- 1, // root midi note zero based
0.003, // attack time
7.5, // release time
10.0 // maximum sample length
));
delete audioReader;
}[/code]
But when I looked at the task manager it showed 120MB loaded in to my app which is exactly how big the files were when in .wav format.
Does the AudioFormatReader convert the files back to .wav data. Is there no way to actually play pure .ogg format?