00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef _SAMPLE_H_
00021 #define _SAMPLE_H_
00022
00023 #include <string>
00024
00025 namespace Vamos_Geometry
00026 {
00027 class Missing_Sound_File
00028 {
00029 private:
00030 std::string m_file;
00031 public:
00032 Missing_Sound_File (std::string file) : m_file (file) {};
00033 std::string message () { return "Can't find the sound file \""
00034 + m_file + '\"'; }
00035 };
00036
00037 class slScheduler
00038 {
00039 public:
00040 int dummyvar;
00041 };
00042
00043
00044 class Sample
00045 {
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055
00056 public:
00057 Sample (std::string file, double base_volume, double base_pitch,
00058 bool volume_envelope = false, bool pitch_envelope = false);
00059
00060 ~Sample ();
00061
00062 void schedule (slScheduler* scheduler,
00063 bool loop = false,
00064 int priority = 0);
00065
00066
00067 void volume (double volume_factor);
00068
00069 void pitch (double pitch_factor);
00070
00071 void play ();
00072 void pause ();
00073 void stop ();
00074 };
00075 }
00076
00077 #endif // not _SAMPLE_H_