]> git.mxchange.org Git - flightgear.git/blobdiff - src/ATCDCL/ATCVoice.hxx
Fix a couple of 64-bit warnings identified by GCC.
[flightgear.git] / src / ATCDCL / ATCVoice.hxx
index 6ec4f39324ad7e62e8dc08956abe82cd67821b5b..55fe68a7c6547155ca0aefa50138ba48e474c95c 100644 (file)
 #define _FG_ATC_VOICE
 
 #include <simgear/compiler.h>
+#include <simgear/structure/SGSharedPtr.hxx>
 
 #include <map>
 #include <string>
 
 class SGSoundSample;
+class SGPath;
 
 struct WordData {
        unsigned int offset;    // Offset of beginning of word sample into raw sound sample
@@ -46,18 +48,20 @@ public:
 
        // Load the two voice files - one containing the raw sound data (.wav) and one containing the word positions (.vce).
        // Return true if successful.   
-       bool LoadVoice(const std::string& voice);
+       bool LoadVoice(const std::string& voicename);
        
        // Given a desired message, return a pointer to the data buffer and write the buffer length into len.
        // Sets len to something other than 0 if the returned buffer is valid.
-       void* WriteMessage(const char* message, size_t *len);
+       void* WriteMessage(const std::string& message, size_t *len);
 
 private:
+       bool AppendVoiceFile(const SGPath& basepath, const std::string& file);
+       bool ParseVoiceIndex(const SGPath& basepath, const std::string& file, size_t globaloffset);
 
        // the sound and word position data
        char* rawSoundData;
        size_t rawDataSize;
-        SGSoundSample *SoundData;
+        SGSharedPtr<SGSoundSample> SoundData;
 
        // A map of words vs. byte position and length in rawSoundData
        atc_word_map_type wordMap;