DDraceNetwork Docs
ISound Class Referenceabstract

#include <sound.h>

Inheritance diagram for ISound:
[legend]
Collaboration diagram for ISound:
[legend]

Classes

struct  CSampleHandle
 
class  CVoiceHandle
 
struct  CVoiceShapeCircle
 
struct  CVoiceShapeRectangle
 

Public Types

enum  {
  FLAG_LOOP = 1 << 0 , FLAG_POS = 1 << 1 , FLAG_NO_PANNING = 1 << 2 , FLAG_PREVIEW = 1 << 3 ,
  FLAG_ALL = FLAG_LOOP | FLAG_POS | FLAG_NO_PANNING | FLAG_PREVIEW
}
 
enum  { SHAPE_CIRCLE , SHAPE_RECTANGLE }
 

Public Member Functions

virtual bool IsSoundEnabled ()=0
 
virtual int LoadOpus (const char *pFilename, int StorageType=IStorage::TYPE_ALL)=0
 
virtual int LoadWV (const char *pFilename, int StorageType=IStorage::TYPE_ALL)=0
 
virtual int LoadOpusFromMem (const void *pData, unsigned DataSize, bool FromEditor=false)=0
 
virtual int LoadWVFromMem (const void *pData, unsigned DataSize, bool FromEditor=false)=0
 
virtual void UnloadSample (int SampleId)=0
 
virtual float GetSampleTotalTime (int SampleId)=0
 
virtual float GetSampleCurrentTime (int SampleId)=0
 
virtual void SetSampleCurrentTime (int SampleId, float Time)=0
 
virtual void SetChannel (int ChannelId, float Volume, float Panning)=0
 
virtual void SetListenerPosition (vec2 Position)=0
 
virtual void SetVoiceVolume (CVoiceHandle Voice, float Volume)=0
 
virtual void SetVoiceFalloff (CVoiceHandle Voice, float Falloff)=0
 
virtual void SetVoicePosition (CVoiceHandle Voice, vec2 Position)=0
 
virtual void SetVoiceTimeOffset (CVoiceHandle Voice, float TimeOffset)=0
 
virtual void SetVoiceCircle (CVoiceHandle Voice, float Radius)=0
 
virtual void SetVoiceRectangle (CVoiceHandle Voice, float Width, float Height)=0
 
virtual CVoiceHandle PlayAt (int ChannelId, int SampleId, int Flags, float Volume, vec2 Position)=0
 
virtual CVoiceHandle Play (int ChannelId, int SampleId, int Flags, float Volume)=0
 
virtual void Pause (int SampleId)=0
 
virtual void Stop (int SampleId)=0
 
virtual void StopAll ()=0
 
virtual void StopVoice (CVoiceHandle Voice)=0
 
virtual bool IsPlaying (int SampleId)=0
 
virtual int MixingRate () const =0
 
virtual void Mix (short *pFinalOut, unsigned Frames)=0
 
virtual void PauseAudioDevice ()=0
 
virtual void UnpauseAudioDevice ()=0
 
- Public Member Functions inherited from IInterface
 IInterface ()
 
virtual void Shutdown ()
 
virtual ~IInterface ()
 

Protected Member Functions

CVoiceHandle CreateVoiceHandle (int Index, int Age)
 
- Protected Member Functions inherited from IInterface
IKernelKernel ()
 

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
FLAG_LOOP 
FLAG_POS 
FLAG_NO_PANNING 
FLAG_PREVIEW 
FLAG_ALL 

◆ anonymous enum

anonymous enum
Enumerator
SHAPE_CIRCLE 
SHAPE_RECTANGLE 

Member Function Documentation

◆ CreateVoiceHandle()

CVoiceHandle ISound::CreateVoiceHandle ( int  Index,
int  Age 
)
inlineprotected

◆ GetSampleCurrentTime()

virtual float ISound::GetSampleCurrentTime ( int  SampleId)
pure virtual

Implemented in CSound.

◆ GetSampleTotalTime()

virtual float ISound::GetSampleTotalTime ( int  SampleId)
pure virtual

Implemented in CSound.

◆ IsPlaying()

virtual bool ISound::IsPlaying ( int  SampleId)
pure virtual

Implemented in CSound.

◆ IsSoundEnabled()

virtual bool ISound::IsSoundEnabled ( )
pure virtual

Implemented in CSound.

◆ LoadOpus()

virtual int ISound::LoadOpus ( const char *  pFilename,
int  StorageType = IStorage::TYPE_ALL 
)
pure virtual

Implemented in CSound.

◆ LoadOpusFromMem()

virtual int ISound::LoadOpusFromMem ( const void *  pData,
unsigned  DataSize,
bool  FromEditor = false 
)
pure virtual

Implemented in CSound.

◆ LoadWV()

virtual int ISound::LoadWV ( const char *  pFilename,
int  StorageType = IStorage::TYPE_ALL 
)
pure virtual

Implemented in CSound.

◆ LoadWVFromMem()

virtual int ISound::LoadWVFromMem ( const void *  pData,
unsigned  DataSize,
bool  FromEditor = false 
)
pure virtual

Implemented in CSound.

◆ Mix()

virtual void ISound::Mix ( short *  pFinalOut,
unsigned  Frames 
)
pure virtual

Implemented in CSound.

◆ MixingRate()

virtual int ISound::MixingRate ( ) const
pure virtual

Implemented in CSound.

◆ Pause()

virtual void ISound::Pause ( int  SampleId)
pure virtual

Implemented in CSound.

◆ PauseAudioDevice()

virtual void ISound::PauseAudioDevice ( )
pure virtual

Implemented in CSound.

◆ Play()

virtual CVoiceHandle ISound::Play ( int  ChannelId,
int  SampleId,
int  Flags,
float  Volume 
)
pure virtual

Implemented in CSound.

◆ PlayAt()

virtual CVoiceHandle ISound::PlayAt ( int  ChannelId,
int  SampleId,
int  Flags,
float  Volume,
vec2  Position 
)
pure virtual

Implemented in CSound.

◆ SetChannel()

virtual void ISound::SetChannel ( int  ChannelId,
float  Volume,
float  Panning 
)
pure virtual

Implemented in CSound.

◆ SetListenerPosition()

virtual void ISound::SetListenerPosition ( vec2  Position)
pure virtual

Implemented in CSound.

◆ SetSampleCurrentTime()

virtual void ISound::SetSampleCurrentTime ( int  SampleId,
float  Time 
)
pure virtual

Implemented in CSound.

◆ SetVoiceCircle()

virtual void ISound::SetVoiceCircle ( CVoiceHandle  Voice,
float  Radius 
)
pure virtual

Implemented in CSound.

◆ SetVoiceFalloff()

virtual void ISound::SetVoiceFalloff ( CVoiceHandle  Voice,
float  Falloff 
)
pure virtual

Implemented in CSound.

◆ SetVoicePosition()

virtual void ISound::SetVoicePosition ( CVoiceHandle  Voice,
vec2  Position 
)
pure virtual

Implemented in CSound.

◆ SetVoiceRectangle()

virtual void ISound::SetVoiceRectangle ( CVoiceHandle  Voice,
float  Width,
float  Height 
)
pure virtual

Implemented in CSound.

◆ SetVoiceTimeOffset()

virtual void ISound::SetVoiceTimeOffset ( CVoiceHandle  Voice,
float  TimeOffset 
)
pure virtual

Implemented in CSound.

◆ SetVoiceVolume()

virtual void ISound::SetVoiceVolume ( CVoiceHandle  Voice,
float  Volume 
)
pure virtual

Implemented in CSound.

◆ Stop()

virtual void ISound::Stop ( int  SampleId)
pure virtual

Implemented in CSound.

◆ StopAll()

virtual void ISound::StopAll ( )
pure virtual

Implemented in CSound.

◆ StopVoice()

virtual void ISound::StopVoice ( CVoiceHandle  Voice)
pure virtual

Implemented in CSound.

◆ UnloadSample()

virtual void ISound::UnloadSample ( int  SampleId)
pure virtual

Implemented in CSound.

◆ UnpauseAudioDevice()

virtual void ISound::UnpauseAudioDevice ( )
pure virtual

Implemented in CSound.


The documentation for this class was generated from the following file: