NLSOUND Namespace Reference

This namespace contains the sound classes. More...

Classes

class  CSoundAnimManager
 The set of players. More...
class  CSoundAnimMarker
class  CSoundAnimation
class  UAudioMixer
 Game interface for audio. More...
class  UListener
 Game interface for listener control. More...
struct  CSoundContext
class  USource
 Game interface for sound sources (stereo or 3D sound instances). More...
class  CCancelLoadWavFile
class  CAsyncFileManagerSound
 CAsyncFileManagerSound is a class that manage sound file loading in a seperate thread This class mostly depend on the CAsyncFileManager class for serializing async file loas request. More...
class  CUserVarSerializer
struct  CompareSources
struct  THashPtr
 Hasher functor for hashed container with pointer key. More...
class  CAudioMixerUser
 Implementation of UAudioMixer. More...
class  CBackgroundSound
 A background sound static properties. More...
class  CBackgroundSoundManager
 This manager handle the background sound :

  • primitive positioned sound (point, path and patatoid supported)
  • primitive positioned effect (patatoid only)
  • primitive positioned sample bank (patatoid only)
  • A set of 32 application definable flag that can be used in background sound to filter the sub sounds of a background sound.
More...
class  CBackgroundSource
 Implemetation class for background source. More...
class  CSoundGroupSerializer
class  CClusteredSound
 This class will manage the clipping/positioning/occlusion of sound placed inside the cluster/portal system. More...
class  CComplexSound
class  CComplexSource
 Implemetation class for Complex source. More...
struct  CContextMatcher
class  IContextSoundContainer
class  CContextSoundContainer
class  CContextSound
class  IBuffer
 Sound buffer interface (implemented in sound driver dynamic library). More...
class  CBufferDSound
 Buffer for the DSound implementation of the audio driver. More...
class  CListenerDSound
 DirectSound listener. More...
class  CSoundDriverDSoundNelLibrary
class  CDeviceDescription
class  CSoundDriverDSound
class  CSourceDSound
 Keep trace of following states of the DirectSound buffer:

  • the buffer is being filled with samples (filling),
  • the buffer still contains samples but silence is being written (silencing),
  • the buffer contains no samples but only silence (silenced).
More...
class  IReverbEffect
 IReverbEffect. More...
class  CBufferFMod
 Buffer for the FMod implementation of the audio driver. More...
class  CListenerFMod
 FMOD listener. More...
class  CMusicChannelFMod
 CMusicChannelFMod. More...
class  CSoundDriverFModNelLibrary
class  CSoundDriverFMod
class  CSourceFMod
 DirectSound sound source. More...
class  IListener
 Sound listener interface (implemented in sound driver dynamic library). More...
class  IMusicChannel
 IMusicChannel. More...
class  CBufferAL
 OpenAL buffer. More...
struct  TFrameStereo
class  CEffectAL
 CEffectAL. More...
class  CStandardReverbEffectAL
 CStandardReverbEffectAL. More...
class  CListenerAL
 OpenAL sound listener. More...
class  CSoundDriverALNelLibrary
class  CSoundDriverAL
 OpenAL sound driver. More...
class  CSourceAL
 OpenAL sound source. More...
class  ISoundDriver
 Abstract sound driver (implemented in sound driver dynamic library). More...
class  ESoundDriver
 Sound driver exceptions. More...
class  ESoundDriverNotFound
 ESoundDriverNotFound. More...
class  ESoundDriverCorrupted
 ESoundDriverCorrupted. More...
class  ESoundDriverOldVersion
 ESoundDriverOldVersion. More...
class  ESoundDriverUnknownVersion
 ESoundDriverUnknownVersion. More...
class  ESoundDriverCantCreateDriver
 ESoundDriverCantCreateDriver. More...
class  ESoundDriverGenBuf
 ESoundDriverGenBuf. More...
class  ESoundDriverGenSrc
 ESoundDriverGenBuf. More...
class  ESoundDriverNotSupp
 ESoundDriverNotSupp. More...
class  ESoundDriverNoEnvironmentEffects
 ESoundDriverNoEnvironmentEffects : ESoundDriverNotSupp : ESoundDriver : NLMISC::Exception. More...
class  ESoundDriverNoADPCM
 ESoundDriverNoADPCM : ESoundDriverNotSupp : ESoundDriver : NLMISC::Exception. More...
class  ESoundDriverNoBufferStreaming
 ESoundDriverNoBufferStreaming : ESoundDriverNotSupp : ESoundDriver : NLMISC::Exception. More...
class  ESoundDriverNoManualRolloff
 ESoundDriverNoManualRolloff : ESoundDriverNotSupp : ESoundDriver : NLMISC::Exception. More...
class  ISource
 Sound source interface (implemented in sound driver dynamic library). More...
class  CAdpcmXAudio2
 CAdpcmXAudio2. More...
class  CBufferXAudio2
 CBufferXAudio2. More...
class  CEffectXAudio2
 CEffectXAudio2. More...
class  CReverbEffectXAudio2
 CReverbEffectXAudio2. More...
class  CListenerXAudio2
 CListenerXAudio2. More...
class  IMusicBuffer
 IMusicBuffer. More...
class  CMusicBufferVorbis
 CMusicBufferVorbis. More...
class  CMusicChannelXAudio2
 CMusicChannelXAudio2. More...
class  CSoundDriverXAudio2NelLibrary
class  CSoundDriverXAudio2
 CSoundDriverXAudio2. More...
class  CSourceXAudio2
 CSourceXAudio2. More...
class  CListenerUser
 Implementation of UListener. More...
class  CTrack
 A source selected for playing. More...
class  CMusicChannelFader
 CMusicChannelFader. More...
class  CMusicSound
 A sound describing a streamable music to play. More...
class  CMusicSoundManager
 A manager that manage multiple CMusicSound that want to play at the same time. More...
class  CMusicSource
 A source that play music. More...
class  CSampleBank
 A set of samples. More...
class  ESampleBankNotFound
 ESoundFileNotFound. More...
class  CSimpleSound
 A sound buffer and its static properties. More...
class  CSimpleSource
 Implementation of USource. More...
class  CSound
 A sound base class and its static properties. More...
class  ESoundFileNotFound
 ESoundFileNotFound. More...
struct  TFindId
class  CSoundSerializer
 Pseudo serializer for packed sheet loading/saving. More...
class  CSoundBank
 A set of sounds. More...
class  ESoundBankNotFound
 ESoundFileNotFound. More...
class  CSoundPattern
class  CSourceCommon

Typedefs

typedef sint32 TSoundAnimId
typedef sint32 TSoundAnimPlayId
typedef CHashMap< std::string,
TSoundAnimId
TSoundAnimMap
 Animation name-to-id hash map.
typedef std::vector
< CSoundAnimation * > 
TSoundAnimVector
 Animation vector.
typedef std::set
< NLMISC::TStringId
TMarkerSoundSet
typedef std::vector
< CSoundAnimMarker * > 
TMarkerVector
typedef CSoundTSoundId
 Sound sample identifiers.
typedef void(* TSpawnEndCallback )(USource *, void *)
 Type of callbacks called before a spawned source is deleted.
typedef std::basic_string< uint16uint16_string
typedef void(* TGenFunctionAL )(ALsizei, ALuint *)
typedef void(* TDeleteFunctionAL )(ALsizei, const ALuint *)
typedef ALboolean(* TTestFunctionAL )(ALuint)
typedef ISoundDriver *(* ISDRV_CREATE_PROC )(ISoundDriver::IStringMapperProvider *stringMapper)
typedef uint32(* ISDRV_VERSION_PROC )(void)
typedef CHashMap
< NLMISC::TStringId, IBuffer
*, NLMISC::CStringIdHashMapTraits
TSampleTable
 Sample names hash map.
typedef CHashMap
< NLMISC::TStringId, CSound
*, NLMISC::CStringIdHashMapTraits
TSoundMap
 Sound names hash map.
typedef std::set< CSound * > TSoundSet
 Sound names set (for ambiant sounds).

Enumerations

enum  TSoundPriority {
  HighestPri, HighPri, MidPri, LowPri,
  NbSoundPriorities
}
 

Priority of the sources (p1<p2 means p1 has higher priority than p2).

More...
enum  TSampleFormat {
  Mono8, Mono16ADPCM, Mono16, Stereo8,
  Stereo16
}

Functions

 NLMISC_SAFE_SINGLETON_IMPL (CAsyncFileManagerSound)
const char * getPriorityStr (TSoundPriority p)
 Return the priority cstring (debug info).
static bool checkSound (CSound *sound, const vector< pair< string, CSound * > > &subsounds, vector< string > &missingFiles)
 NLMISC_CATEGORISED_COMMAND (nel, displaySoundInfo,"Display information about the audio mixer","")
 NLMISC_CATEGORISED_COMMAND (nel, displaySoundProfile,"Display information on sound driver","")
static bool checkFourCC (const uint8 *left, const char *right)
static bool readHeader (const uint8 *header, const char *fourcc, uint32 &size, const uint8 *&data)
static bool findChunk (const uint8 *src, uint32 srcSize, const char *fourcc, uint32 &size, const uint8 *&data)
LRESULT NelIOProc (LPSTR lpmmioinfo, UINT uMsg, LONG lParam1, LONG lParam2)
 import io proc def from buffer_dsound.
BOOL WINAPI DllMain (HANDLE hModule, DWORD, LPVOID)
LRESULT CALLBACK CSoundDriverCreateWindowProc (HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
 __declspec (dllexport) ISoundDriver *NLSOUND_createISoundDriverInstance(ISoundDriver
BOOL CALLBACK CSoundDriverDSoundEnumCallback (LPGUID guid, LPCSTR description, PCSTR, LPVOID)
uint32 getWritePosAndSpace (uint32 &nextWritePos, uint32 playPos, uint32 writePos, uint32 bufferSize)
float decibelsToAmplitudeRatio (float d)
signed char F_CALLBACKAPI streamEndCallBack (FSOUND_STREAM *stream, void *, int, void *userdata)
ISoundDriverNLSOUND_createISoundDriverInstance (ISoundDriver::IStringMapperProvider *stringMapper)
uint32 NLSOUND_interfaceVersion ()
bool getTag (std::string &result, const char *tag, FSOUND_STREAM *stream)
void dummyToAvoidStupidVCWarning_stdfmod_cpp ()
void dummyToAvoidStupidCompilerWarning_music_channel_cpp ()
void alTestWarning (const char *src)
void ThrowGenException (TGenFunctionAL algenfunc)
TSampleFormat ALtoNLSoundFormat (ALenum alformat)
 Helper for loadWavFile().
size_t vorbisReadFunc (void *ptr, size_t size, size_t nmemb, void *datasource)
int vorbisSeekFunc (void *datasource, ogg_int64_t offset, int whence)
long vorbisTellFunc (void *datasource)

Variables

const TSoundAnimId CSoundAnimationNoId = -1
static const uint SoundContextNbArgs = 10
const char * PriToCStr [NbSoundPriorities] = { "XH", "HI", "MD", "LO" }
const float INSIDE_FALLOF = 10.0f
const float BACKGROUND_SOUND_ALTITUDE = 5.0f
const uint32 BACKGROUND_LAYER = 5
 Number of background layer. Layer are identified in .prim by a letter starting from 'a' (for layer 0).
float EAX_MATERIAL_PARAM []
std::map< std::string,
CSoundGroupSerializer
Container
static const std::string EmptyString
HWND CSoundDriverWnd = 0
HINSTANCE CSoundDriverDllHandle = 0
const char * IDRV_CREATE_PROC_NAME = "NLSOUND_createISoundDriverInstance"
const char * IDRV_VERSION_PROC_NAME = "NLSOUND_interfaceVersion"
static ov_callbacks OV_CALLBACKS_NLMISC_STREAM
HINSTANCE CSoundDriverXAudio2DllHandle = NULL
uint32 ASYNC_LOADING_SPLIT = 10
 Constante for the number of file to load asynchronously at a time.
const double Sqrt12_2 = 1.0594630943592952645618252949463

Detailed Description

This namespace contains the sound classes.


Typedef Documentation

Definition at line 87 of file sound_driver.cpp.

Definition at line 90 of file sound_driver.cpp.

typedef void(* NLSOUND::TDeleteFunctionAL)(ALsizei, const ALuint *)

Definition at line 39 of file sound_driver_al.h.

typedef void(* NLSOUND::TGenFunctionAL)(ALsizei, ALuint *)

Definition at line 36 of file sound_driver_al.h.

Definition at line 41 of file sound_anim_marker.h.

Definition at line 37 of file sound_animation.h.

Sample names hash map.

Definition at line 40 of file sample_bank.h.

Definition at line 42 of file sound_anim_manager.h.

typedef CHashMap<std::string, TSoundAnimId> NLSOUND::TSoundAnimMap

Animation name-to-id hash map.

Definition at line 63 of file sound_anim_manager.h.

Definition at line 60 of file sound_anim_manager.h.

Animation vector.

Definition at line 66 of file sound_anim_manager.h.

Sound sample identifiers.

Definition at line 63 of file u_source.h.

Sound names hash map.

Definition at line 39 of file sound.h.

typedef std::set<CSound*> NLSOUND::TSoundSet

Sound names set (for ambiant sounds).

Definition at line 47 of file sound.h.

typedef void(* NLSOUND::TSpawnEndCallback)(USource *, void *)

Type of callbacks called before a spawned source is deleted.

Definition at line 74 of file u_source.h.

typedef ALboolean(* NLSOUND::TTestFunctionAL)(ALuint)

Definition at line 43 of file sound_driver_al.h.

typedef std::basic_string< uint16 > NLSOUND::uint16_string

Definition at line 35 of file complex_sound.h.


Enumeration Type Documentation

Enumerator:
Mono8 
Mono16ADPCM 
Mono16 
Stereo8 
Stereo16 

Definition at line 50 of file sound_driver.h.

Priority of the sources (p1<p2 means p1 has higher priority than p2).

Enumerator:
HighestPri 
HighPri 
MidPri 
LowPri 
NbSoundPriorities 

Definition at line 70 of file u_source.h.


Function Documentation

NLSOUND::__declspec ( dllexport   ) 

Definition at line 118 of file sound_driver_xaudio2.cpp.

References NLSOUND::ISoundDriver::DriverXAudio2.

void NLSOUND::alTestWarning ( const char *  src  ) 
TSampleFormat NLSOUND::ALtoNLSoundFormat ( ALenum  alformat  ) 

Helper for loadWavFile().

Definition at line 586 of file sound_driver_al.cpp.

References Mono16, Mono8, nlstop, Stereo16, and Stereo8.

static bool NLSOUND::checkFourCC ( const uint8 left,
const char *  right 
) [static]

Definition at line 346 of file buffer.cpp.

Referenced by NLSOUND::IBuffer::readWav().

static bool NLSOUND::checkSound ( CSound *  sound,
const vector< pair< string, CSound * > > &  subsounds,
vector< string > &  missingFiles 
) [static]

Definition at line 1655 of file audio_mixer_user.cpp.

Referenced by NLSOUND::CAudioMixerUser::createSource().

LRESULT CALLBACK NLSOUND::CSoundDriverCreateWindowProc ( HWND  hWnd,
UINT  message,
WPARAM  wParam,
LPARAM  lParam 
)

Definition at line 81 of file sound_driver_dsound.cpp.

BOOL CALLBACK NLSOUND::CSoundDriverDSoundEnumCallback ( LPGUID  guid,
LPCSTR  description,
PCSTR  ,
LPVOID   
)

Definition at line 342 of file sound_driver_dsound.cpp.

Referenced by NLSOUND::CSoundDriverDSound::init().

float NLSOUND::decibelsToAmplitudeRatio ( float  d  )  [inline]

Definition at line 52 of file effect.h.

Referenced by NLSOUND::CStandardReverbEffectAL::setEnvironment().

BOOL WINAPI NLSOUND::DllMain ( HANDLE  hModule,
DWORD  ,
LPVOID   
)

Definition at line 71 of file sound_driver_xaudio2.cpp.

References CSoundDriverXAudio2DllHandle.

void NLSOUND::dummyToAvoidStupidCompilerWarning_music_channel_cpp (  ) 

Definition at line 44 of file music_channel.cpp.

void NLSOUND::dummyToAvoidStupidVCWarning_stdfmod_cpp (  ) 

Definition at line 30 of file stdfmod.cpp.

static bool NLSOUND::findChunk ( const uint8 src,
uint32  srcSize,
const char *  fourcc,
uint32 size,
const uint8 *&  data 
) [static]

Definition at line 358 of file buffer.cpp.

References readHeader().

Referenced by NLSOUND::IBuffer::readWav().

const char * NLSOUND::getPriorityStr ( TSoundPriority  p  ) 

Return the priority cstring (debug info).

bool NLSOUND::getTag ( std::string &  result,
const char *  tag,
FSOUND_STREAM *  stream 
)

Definition at line 471 of file sound_driver_fmod.cpp.

References min, and NLMISC::trim().

Referenced by NLSOUND::CSoundDriverFMod::getMusicInfo().

uint32 NLSOUND::getWritePosAndSpace ( uint32 nextWritePos,
uint32  playPos,
uint32  writePos,
uint32  bufferSize 
)
LRESULT NLSOUND::NelIOProc ( LPSTR  lpmmioinfo,
UINT  uMsg,
LONG  lParam1,
LONG  lParam2 
)

import io proc def from buffer_dsound.

NLSOUND::NLMISC_CATEGORISED_COMMAND ( nel  ,
displaySoundProfile  ,
"Display information on sound driver"  ,
""   
)
NLSOUND::NLMISC_CATEGORISED_COMMAND ( nel  ,
displaySoundInfo  ,
"Display information about the audio mixer"  ,
""   
)
NLSOUND::NLMISC_SAFE_SINGLETON_IMPL ( CAsyncFileManagerSound   ) 
ISoundDriver * NLSOUND::NLSOUND_createISoundDriverInstance ( ISoundDriver::IStringMapperProvider *  stringMapper  ) 

Definition at line 157 of file sound_driver_al.cpp.

uint32 NLSOUND::NLSOUND_interfaceVersion (  ) 

Definition at line 162 of file sound_driver_al.cpp.

References NLSOUND::ISoundDriver::InterfaceVersion.

static bool NLSOUND::readHeader ( const uint8 header,
const char *  fourcc,
uint32 size,
const uint8 *&  data 
) [static]

Definition at line 351 of file buffer.cpp.

Referenced by findChunk(), and NLSOUND::IBuffer::readWav().

signed char F_CALLBACKAPI NLSOUND::streamEndCallBack ( FSOUND_STREAM *  stream,
void *  ,
int  ,
void *  userdata 
)
void NLSOUND::ThrowGenException ( TGenFunctionAL  algenfunc  ) 

Definition at line 324 of file sound_driver_al.cpp.

References nlstop.

Referenced by NLSOUND::CSoundDriverAL::generateItems().

size_t NLSOUND::vorbisReadFunc ( void *  ptr,
size_t  size,
size_t  nmemb,
void *  datasource 
)
int NLSOUND::vorbisSeekFunc ( void *  datasource,
ogg_int64_t  offset,
int  whence 
)
long NLSOUND::vorbisTellFunc ( void *  datasource  ) 

Variable Documentation

Constante for the number of file to load asynchronously at a time.

Definition at line 43 of file sample_bank.cpp.

Referenced by NLSOUND::CSampleBank::onUpdate().

std::map<std::string, CSoundGroupSerializer> NLSOUND::Container

Definition at line 59 of file sound_driver_dsound.cpp.

Definition at line 52 of file sound_driver_dsound.cpp.

Referenced by NLSOUND::CSoundDriverDSound::init().

Definition at line 70 of file sound_driver_xaudio2.cpp.

Referenced by DllMain().

Initial value:
{
    float(pow((double)10, (double)-2800/2000)),
    float(pow((double)10, (double)-5000/2000)),
    float(pow((double)10, (double)-1800/2000)),
    float(pow((double)10, (double)-4400/2000)),
    float(pow((double)10, (double)-4000/2000)),
    float(pow((double)10, (double)-5000/2000)),
    float(pow((double)10, (double)-6000/2000)),
    float(pow((double)10, (double)-1200/2000))
}

Definition at line 63 of file clustered_sound.cpp.

Referenced by NLSOUND::CClusteredSound::soundTraverse().

static const std::string NLSOUND::EmptyString [static]
const char* NLSOUND::IDRV_CREATE_PROC_NAME = "NLSOUND_createISoundDriverInstance"

Definition at line 88 of file sound_driver.cpp.

Referenced by NLSOUND::ISoundDriver::createDriver().

const char* NLSOUND::IDRV_VERSION_PROC_NAME = "NLSOUND_interfaceVersion"

Definition at line 91 of file sound_driver.cpp.

Referenced by NLSOUND::ISoundDriver::createDriver().

ov_callbacks NLSOUND::OV_CALLBACKS_NLMISC_STREAM [static]
Initial value:
 {
  (size_t (*)(void *, size_t, size_t, void *))  vorbisReadFunc,
  (int (*)(void *, ogg_int64_t, int))         vorbisSeekFunc,
  (int (*)(void *))                          NULL, 
  (long (*)(void *))                            vorbisTellFunc
}

Definition at line 99 of file music_buffer_vorbis.cpp.

Referenced by NLSOUND::CMusicBufferVorbis::CMusicBufferVorbis().

const char* NLSOUND::PriToCStr[NbSoundPriorities] = { "XH", "HI", "MD", "LO" }

Definition at line 75 of file audio_mixer_user.cpp.

const uint NLSOUND::SoundContextNbArgs = 10 [static]
const double NLSOUND::Sqrt12_2 = 1.0594630943592952645618252949463

Definition at line 49 of file sound.h.

Referenced by NLSOUND::CSound::importForm().


Generated on Thu Jan 7 08:30:22 2010 for NeL by  doxygen 1.6.1