00001 /* 00002 $Id: static_soundprovider.h,v 1.1 2001/03/06 15:09:12 mbn Exp $ 00003 00004 ------------------------------------------------------------------------ 00005 ClanLib, the platform independent game SDK. 00006 00007 This library is distributed under the GNU LIBRARY GENERAL PUBLIC LICENSE 00008 version 2. See COPYING for details. 00009 00010 For a total list of contributers see CREDITS. 00011 00012 ------------------------------------------------------------------------ 00013 */ 00014 00016 00017 #ifndef header_static_soundprovider 00018 #define header_static_soundprovider 00019 00020 #include "soundformat.h" 00021 00022 class CL_StaticSoundProvider 00023 //: Static Soundprovider class. 00024 // The static soundprovider provides the data for any static (non-streamed) 00025 // samples played using the ClanLib sound system. 00026 { 00027 public: 00028 virtual ~CL_StaticSoundProvider() { ; } 00029 00030 virtual void lock()=0; 00031 //: Locks the soundprovider. Locking a provider means, that 00032 //: the contents of the provider should be available following the 00033 //: call to lock(), which means that lock loads any files from disk, 00034 //: and performs any necessary initializations. 00035 00036 virtual void unlock()=0; 00037 //: Unlocks the soundprovider. Unlocking a provider means, that 00038 //: the contents of the provider should be deinitialized, thus 00039 //: removing any loaded sample data from memory. 00040 00041 virtual SoundFormat get_format() const =0; 00042 //: Returns the soundformat of the data stored by the provider. 00043 //: The data stored can be either 8-bit signed, 8-bit unsigned, 00044 //: 16-bit signed and 16-bit unsigned. 00046 00047 virtual int data_size() const =0; 00048 //: Returns the total size in bytes of the data stored. 00050 00051 virtual void *get_data() const =0; 00052 //: Returns a pointer to the data stored. 00054 00055 virtual int get_frequency() const =0; 00056 //: Returns the frequency of the data stored. 00058 }; 00059 00060 #endif
1.2.6 written by Dimitri van Heesch,
© 1997-2001