async_file_manager_sound.h

Go to the documentation of this file.
00001 
00005 /* Copyright, 2000 Nevrax Ltd.
00006  *
00007  * This file is part of NEVRAX NEL.
00008  * NEVRAX NEL is free software; you can redistribute it and/or modify
00009  * it under the terms of the GNU General Public License as published by
00010  * the Free Software Foundation; either version 2, or (at your option)
00011  * any later version.
00012 
00013  * NEVRAX NEL is distributed in the hope that it will be useful, but
00014  * WITHOUT ANY WARRANTY; without even the implied warranty of
00015  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
00016  * General Public License for more details.
00017 
00018  * You should have received a copy of the GNU General Public License
00019  * along with NEVRAX NEL; see the file COPYING. If not, write to the
00020  * Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
00021  * MA 02111-1307, USA.
00022  */
00023 
00024 #include "nel/misc/thread.h"
00025 
00026 namespace NLSOUND
00027 {
00028 
00029 class IBuffer;
00030 
00031 
00040 class CAsyncFileManagerSound
00041 {
00042     NLMISC_SAFE_SINGLETON_DECL(CAsyncFileManagerSound);
00043 public:
00044 //  static  CAsyncFileManagerSound &getInstance();
00045     static  void    terminate();
00046 
00047 
00048     void    loadWavFile(IBuffer *pdestBuffer, const std::string &filename);
00049     void    cancelLoadWaveFile(const std::string &filename);
00050 
00051     // Do not use these methods with the bigfile manager
00052     void loadFile (const std::string &fileName, uint8 **pPtr);
00053     void loadFiles (const std::vector<std::string> &vFileNames, const std::vector<uint8**> &vPtrs);
00054 
00055     void signal (bool *pSgn); // Signal a end of loading for a group of "mesh or file" added
00056     void cancelSignal (bool *pSgn);
00057 
00058 private:
00060     CAsyncFileManagerSound() {}
00061 
00063 //  static CAsyncFileManagerSound   *_Singleton;
00064 
00065 
00067     friend class CCancelLoadWavFile;
00068 
00069     // Load task.
00070     class CLoadWavFile : public NLMISC::IRunnable
00071     {
00072         IBuffer     *_pDestbuffer;
00073 
00074     public:
00075         std::string _Filename;
00076 
00077         CLoadWavFile (IBuffer *pdestBuffer, const std::string &filename);
00078         void run (void);
00079     };
00080 
00081 };
00082 
00083 } // NLSOUND

Generated on Thu Jan 7 08:26:36 2010 for NeL by  doxygen 1.6.1