1 2 #ifndef _SAMPLES_H 3 #define _SAMPLES_H 4 5 #include <BeBuild.h> 6 #include <Entry.h> 7 8 typedef void (*sample_exit_hook)(int32 arg); 9 typedef bool (*sample_loop_hook)(int32 arg); 10 11 class BSamples 12 { 13 public: 14 15 BSamples(); 16 virtual ~BSamples(); 17 18 void Start( 19 void* sampleData, int32 frames, int16 bytes_per_sample, 20 int16 channel_count, double pitch, int32 loopStart, int32 loopEnd, 21 double sampleVolume, double stereoPosition, int32 hook_arg, 22 sample_loop_hook pLoopContinueProc, sample_exit_hook pDoneProc); 23 24 bool IsPaused(void) const; 25 void Pause(void); 26 void Resume(void); 27 void Stop(void); 28 bool IsPlaying(void) const; 29 30 void SetVolume(double newVolume); 31 double Volume(void) const; 32 33 void SetSamplingRate(double newRate); 34 double SamplingRate(void) const; 35 36 void SetPlacement(double stereoPosition); 37 double Placement(void) const; 38 39 void EnableReverb(bool useReverb); 40 41 private: 42 43 virtual void _ReservedSamples1(); 44 virtual void _ReservedSamples2(); 45 virtual void _ReservedSamples3(); 46 47 uint32 _reserved[8]; 48 }; 49 50 #endif // _SAMPLES_H 51