}
FGATCVoice::~FGATCVoice() {
- // delete SoundData;
+ free( rawSoundData );
+ delete SoundData;
}
// Load the two voice files - one containing the raw sound data (.wav) and one containing the word positions (.vce).
// Return true if successful.
-bool FGATCVoice::LoadVoice(string voice) {
+bool FGATCVoice::LoadVoice(const string& voice) {
// FIXME CLO: disabled to try to see if this is causign problemcs
// return false;
string file = voice + ".wav";
- SoundData = new SGSoundSample( path.c_str(), file.c_str(), false );
+ SoundData = new SGSoundSample();
+ rawSoundData = (char *)SoundData->load_file(path.c_str(), file.c_str());
rawDataSize = SoundData->get_size();
- rawSoundData = SoundData->get_data();
path = globals->get_fg_root();
string wordPath = "ATC/" + voice + ".vce";