mirror of
https://github.com/Halofreak1990/XFXFramework
synced 2024-12-26 13:49:34 +01:00
65 lines
1.6 KiB
C++
65 lines
1.6 KiB
C++
/*****************************************************************************
|
|
* SoundEffectInstance.h *
|
|
* *
|
|
* XFX::Audio::SoundEffectInstance class definition file *
|
|
* Copyright (c) XFX Team. All Rights Reserved *
|
|
*****************************************************************************/
|
|
#include <System/Interfaces.h>
|
|
#include "Enums.h"
|
|
|
|
using namespace System;
|
|
|
|
namespace XFX
|
|
{
|
|
namespace Audio
|
|
{
|
|
class AudioListener;
|
|
class AudioEmitter;
|
|
class DynamicSoundEffectInstance;
|
|
class SoundEffect;
|
|
|
|
/**
|
|
* Provides a single playing, paused, or stopped instance of a SoundEffect sound.
|
|
*/
|
|
class SoundEffectInstance : public IDisposable, public Object
|
|
{
|
|
private:
|
|
friend class SoundEffect;
|
|
friend class DynamicSoundEffectInstance;
|
|
|
|
float _pan;
|
|
SoundEffect* _parent;
|
|
float _volume;
|
|
|
|
SoundEffectInstance();
|
|
SoundEffectInstance(SoundEffect * const parent, bool fireAndForget);
|
|
|
|
virtual void Dispose(bool disposing);
|
|
|
|
public:
|
|
bool IsDisposed() const;
|
|
virtual bool IsLooped() const;
|
|
virtual void IsLooped(bool value);
|
|
float getPan() const;
|
|
void setPan(float value);
|
|
float getPitch() const;
|
|
void setPitch(float value);
|
|
SoundState_t getState() const;
|
|
float getVolume() const;
|
|
void setVolume(float value);
|
|
|
|
~SoundEffectInstance();
|
|
|
|
void Apply3D(AudioListener listener, AudioEmitter emitter);
|
|
void Apply3D(AudioListener listeners[], AudioEmitter emitter);
|
|
void Dispose();
|
|
static const Type& GetType();
|
|
void Pause();
|
|
virtual void Play();
|
|
void Resume();
|
|
void Stop();
|
|
void Stop(bool immediate);
|
|
};
|
|
}
|
|
}
|