1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67
|
/* Original Audiere Sound Instance class by Rheenen 2005 */
#ifndef __AudiereSoundINSTANCE_H__
#define __AudiereSoundINSTANCE_H__
#include "SoundInstance.h"
#include "audiere.h"
using namespace audiere;
namespace Sexy
{
class AudiereSoundManager;
class AudiereSoundInstance : public SoundInstance
{
friend class AudiereSoundManager;
protected:
AudiereSoundManager* mAudiereSoundManagerP;
OutputStreamPtr mStream;
bool mAutoRelease;
bool mReleased;
float mBasePan;
float mBaseVolume;
float mBasePitch;
float mPan;
float mVolume;
float mPitch;
bool mHasPlayed;
protected:
void RehupVolume();
void RehupPan();
void RehupPitch();
public:
AudiereSoundInstance(AudiereSoundManager* theSoundManager, SampleSourcePtr theSourceSound);
virtual ~AudiereSoundInstance();
virtual void Release();
virtual void SetBaseVolume(double theBaseVolume); //0.0 to 1.0
virtual void SetBasePan(int theBasePan); //-100 to +100
virtual void AdjustBasePitch(float thePitch); //+0.5 to +2.0 relative to normal playing speed
virtual void SetVolume(double theVolume); //0.0 to 1.0
virtual void SetPan(int thePosition); //-100 to +100 = left to right
virtual void AdjustPitch(double thePitch); //+0.5 to +2.0 relative to normal playing speed
virtual bool Play(bool looping, bool autoRelease);
virtual void Stop();
virtual bool IsPlaying();
virtual bool IsReleased();
virtual double GetVolume();
};
}
#endif //__AudiereSoundINSTANCE_H__
|