HPL3/Amnesia: Rebirth/Scripting/Scripting Api/cSound

From Frictional Wiki
Jump to navigation Jump to search

Have some helpful descriptions to add to this class? Edit this page and add your insight to the Wiki!

Summary

Return Type Function and Description
bool cSound_CheckSoundIsBlocked(const cVector3f &in avSoundPosition)
iSoundEvent cSound_CreateEvent(iSoundEventData@ apData, bool abNonBlockingLoad)
void cSound_DestroyEvent(iSoundEvent@ apEvent)
void cSound_DestroyUnusedData(int alMaxAmount, int alMaxAge, bool abRemoveUnusedProjects, bool abRemovePreloaded)
int cSound_FadeGlobalSpeed(float afDestSpeed, float afSpeed, uint mAffectedTypes, int alId, bool abDestroyIdAtDest)
int cSound_FadeGlobalVolume(float afDestVolume, float afSpeed, uint mAffectedTypes, int alId, bool abDestroyIdAtDest)
void cSound_FadeHighPassFilter(float afDestCutOff, float afDestResonance, float afTime, uint mAffectedTypes)
void cSound_FadeLowPassFilter(float afDestCutOff, float afDestResonance, float afTime, uint mAffectedTypes)
void cSound_FadeMusicVolumeMul(float afDest, float afSpeed)
void cSound_FadeOutAll(uint mTypes, float afFadeSpeed, bool abDisableStop)
cSoundEntry cSound_GetEntry(const tString &in asName)
tString cSound_GetEventCategory_Gui()
tString cSound_GetEventCategory_World()
tString cSound_GetEventCategory_WorldClean()
iSoundEventData cSound_GetEventData(const tString &in asInternalPath, bool abLoadData, bool abNonBlockingLoad)
iSoundEventProject cSound_GetEventProject(const tString &in asName)
uint cSound_GetEventSystemMemoryUsed()
float cSound_GetGlobalSpeed(eSoundEntryType aType)
float cSound_GetGlobalSpeedFromId(int alId)
float cSound_GetGlobalVolume(eSoundEntryType aType)
float cSound_GetGlobalVolumeFromId(int alId)
float cSound_GetMusicVolumeMul()
bool cSound_GetSilent()
bool cSound_IsPlaying(const tString &in asName)
bool cSound_IsValid(cSoundEntry @apEntry, int alID)
void cSound_PauseAll(uint mTypes)
void cSound_PauseMusic()
cSoundEntry cSound_Play(const tString &in asName, bool abLoop, float afVolume, const cVector3f &in avPos, float afMinDist, float afMaxDist, eSoundEntryType aEntryType, bool abRelative, bool ab3D, int alPriorityModifier, bool abStream, bool abNonBlockedLoad)
cSoundEntry cSound_Play3D(const tString &in asName, bool abLoop, float afVolume, const cVector3f &in avPos, float afMinDist, float afMaxDist, eSoundEntryType aEntryType, bool abRelative, int alPriorityModifier, bool abStream, bool abNonBlockedLoad)
cSoundEntry cSound_PlayGui(const tString &in asName, bool abLoop, float afVolume, const cVector3f &in avPos, eSoundEntryType aEntryType)
cSoundEntry cSound_PlayGuiStream(const tString &in asFileName, bool abLoop, float afVolume, const cVector3f &in avPos, eSoundEntryType aEntryType)
bool cSound_PlayMusic(const tString &in asFileName, float afVolume, float afVolumeFadeStepSize, float afFreq, float afFreqFadeStepSize, bool abLoop, bool abResume)
cSoundEntry cSound_PlaySoundEntityGui(const tString &in asName, bool abLoop, float afVolume, eSoundEntryType aEntryType, const cVector3f &in avPos)
cSoundEntry cSound_PlaySoundEvent(const tString &in asInternalPath, float afVolume, const cVector3f &in avPos, const cVector3f &in avOrientation, bool abNonBlockLoad)
void cSound_PreloadGroup(const tString &in asInternalPath, bool abNonBlockingLoad, bool abSubGroups)
void cSound_PreloadProject(const tString &in asName, bool abNonBlockingLoad)
void cSound_PreloadSoundEvent(const tString &in asInternalPath)
void cSound_ResumeAll(uint mTypes)
void cSound_ResumeMusic()
void cSound_SetEventCategory_Gui(const tString &in asCat)
void cSound_SetEventCategory_World(const tString &in asCat)
void cSound_SetEventCategory_WorldClean(const tString &in asCat)
int cSound_SetGlobalSpeed(float afSpeed, uint mAffectedTypes, int alId)
int cSound_SetGlobalVolume(float afVolume, uint mAffectedTypes, int alId)
void cSound_SetMusicVolumeMul(float afMul)
void cSound_SetSilent(bool abX)
bool cSound_Stop(const tString &in asName, bool abPlayEnd)
void cSound_StopAll(uint mTypes, bool abPlayEnd)
void cSound_StopMusic(float afFadeStepSize)

Function Detail

cSound_CheckSoundIsBlocked

bool cSound_CheckSoundIsBlocked(const cVector3f &in avSoundPosition)


Parameters

Returns:

  • bool

cSound_CreateEvent

iSoundEvent@ cSound_CreateEvent(iSoundEventData@ apData,
                                bool abNonBlockingLoad)


Parameters

Returns:

  • iSoundEvent@

cSound_DestroyEvent

void cSound_DestroyEvent(iSoundEvent@ apEvent)


Parameters

Returns:

  • void

cSound_DestroyUnusedData

void cSound_DestroyUnusedData(int alMaxAmount,
                              int alMaxAge,
                              bool abRemoveUnusedProjects,
                              bool abRemovePreloaded)


Parameters

  • alMaxAmount (int) —
  • alMaxAge (int) —
  • abRemoveUnusedProjects (bool) —
  • abRemovePreloaded (bool) —

Returns:

  • void

cSound_FadeGlobalSpeed

int cSound_FadeGlobalSpeed(float afDestSpeed,
                           float afSpeed,
                           uint mAffectedTypes,
                           int alId,
                           bool abDestroyIdAtDest)


Parameters

  • afDestSpeed (float) —
  • afSpeed (float) —
  • mAffectedTypes (uint) —
  • alId (int) —
  • abDestroyIdAtDest (bool) —

Returns:

  • int

cSound_FadeGlobalVolume

int cSound_FadeGlobalVolume(float afDestVolume,
                            float afSpeed,
                            uint mAffectedTypes,
                            int alId,
                            bool abDestroyIdAtDest)


Parameters

  • afDestVolume (float) —
  • afSpeed (float) —
  • mAffectedTypes (uint) —
  • alId (int) —
  • abDestroyIdAtDest (bool) —

Returns:

  • int

cSound_FadeHighPassFilter

void cSound_FadeHighPassFilter(float afDestCutOff,
                               float afDestResonance,
                               float afTime,
                               uint mAffectedTypes)


Parameters

  • afDestCutOff (float) —
  • afDestResonance (float) —
  • afTime (float) —
  • mAffectedTypes (uint) —

Returns:

  • void

cSound_FadeLowPassFilter

void cSound_FadeLowPassFilter(float afDestCutOff,
                              float afDestResonance,
                              float afTime,
                              uint mAffectedTypes)


Parameters

  • afDestCutOff (float) —
  • afDestResonance (float) —
  • afTime (float) —
  • mAffectedTypes (uint) —

Returns:

  • void

cSound_FadeMusicVolumeMul

void cSound_FadeMusicVolumeMul(float afDest,
                               float afSpeed)


Parameters

  • afDest (float) —
  • afSpeed (float) —

Returns:

  • void

cSound_FadeOutAll

void cSound_FadeOutAll(uint mTypes,
                       float afFadeSpeed,
                       bool abDisableStop)


Parameters

  • mTypes (uint) —
  • afFadeSpeed (float) —
  • abDisableStop (bool) —

Returns:

  • void

cSound_GetEntry

cSoundEntry@ cSound_GetEntry(const tString &in asName)


Parameters

Returns:

  • cSoundEntry@

cSound_GetEventCategory_Gui

const tString& cSound_GetEventCategory_Gui()

Returns:

  • const tString&

cSound_GetEventCategory_World

const tString& cSound_GetEventCategory_World()

Returns:

  • const tString&

cSound_GetEventCategory_WorldClean

const tString& cSound_GetEventCategory_WorldClean()

Returns:

  • const tString&

cSound_GetEventData

iSoundEventData@ cSound_GetEventData(const tString &in asInternalPath,
                                     bool abLoadData,
                                     bool abNonBlockingLoad)


Parameters

  • asInternalPath (tString) —
  • abLoadData (bool) —
  • abNonBlockingLoad (bool) —

Returns:

  • iSoundEventData@

cSound_GetEventProject

iSoundEventProject@ cSound_GetEventProject(const tString &in asName)


Parameters

Returns:

  • iSoundEventProject@

cSound_GetEventSystemMemoryUsed

uint cSound_GetEventSystemMemoryUsed()

Returns:

  • uint

cSound_GetGlobalSpeed

float cSound_GetGlobalSpeed(eSoundEntryType aType)


Parameters

Returns:

  • float

cSound_GetGlobalSpeedFromId

float cSound_GetGlobalSpeedFromId(int alId)


Parameters

  • alId (int) —

Returns:

  • float

cSound_GetGlobalVolume

float cSound_GetGlobalVolume(eSoundEntryType aType)


Parameters

Returns:

  • float

cSound_GetGlobalVolumeFromId

float cSound_GetGlobalVolumeFromId(int alId)


Parameters

  • alId (int) —

Returns:

  • float

cSound_GetMusicVolumeMul

float cSound_GetMusicVolumeMul()

Returns:

  • float

cSound_GetSilent

bool cSound_GetSilent()

Returns:

  • bool

cSound_IsPlaying

bool cSound_IsPlaying(const tString &in asName)


Parameters

Returns:

  • bool

cSound_IsValid

bool cSound_IsValid(cSoundEntry @apEntry,
                    int alID)


Parameters

Returns:

  • bool

cSound_PauseAll

void cSound_PauseAll(uint mTypes)


Parameters

  • mTypes (uint) —

Returns:

  • void

cSound_PauseMusic

void cSound_PauseMusic()

Returns:

  • void

cSound_Play

cSoundEntry@ cSound_Play(const tString &in asName,
                         bool abLoop,
                         float afVolume,
                         const cVector3f &in avPos,
                         float afMinDist,
                         float afMaxDist,
                         eSoundEntryType aEntryType,
                         bool abRelative,
                         bool ab3D,
                         int alPriorityModifier,
                         bool abStream,
                         bool abNonBlockedLoad)


Parameters

  • asName (tString) —
  • abLoop (bool) —
  • afVolume (float) —
  • avPos (cVector3f) —
  • afMinDist (float) —
  • afMaxDist (float) —
  • aEntryType (eSoundEntryType) —
  • abRelative (bool) —
  • ab3D (bool) —
  • alPriorityModifier (int) —
  • abStream (bool) —
  • abNonBlockedLoad (bool) —

Returns:

  • cSoundEntry@

cSound_Play3D

cSoundEntry@ cSound_Play3D(const tString &in asName,
                           bool abLoop,
                           float afVolume,
                           const cVector3f &in avPos,
                           float afMinDist,
                           float afMaxDist,
                           eSoundEntryType aEntryType,
                           bool abRelative,
                           int alPriorityModifier,
                           bool abStream,
                           bool abNonBlockedLoad)


Parameters

  • asName (tString) —
  • abLoop (bool) —
  • afVolume (float) —
  • avPos (cVector3f) —
  • afMinDist (float) —
  • afMaxDist (float) —
  • aEntryType (eSoundEntryType) —
  • abRelative (bool) —
  • alPriorityModifier (int) —
  • abStream (bool) —
  • abNonBlockedLoad (bool) —

Returns:

  • cSoundEntry@

cSound_PlayGui

cSoundEntry@ cSound_PlayGui(const tString &in asName,
                            bool abLoop,
                            float afVolume,
                            const cVector3f &in avPos,
                            eSoundEntryType aEntryType)


Parameters

Returns:

  • cSoundEntry@

cSound_PlayGuiStream

cSoundEntry@ cSound_PlayGuiStream(const tString &in asFileName,
                                  bool abLoop,
                                  float afVolume,
                                  const cVector3f &in avPos,
                                  eSoundEntryType aEntryType)


Parameters

Returns:

  • cSoundEntry@

cSound_PlayMusic

bool cSound_PlayMusic(const tString &in asFileName,
                      float afVolume,
                      float afVolumeFadeStepSize,
                      float afFreq,
                      float afFreqFadeStepSize,
                      bool abLoop,
                      bool abResume)


Parameters

  • asFileName (tString) —
  • afVolume (float) —
  • afVolumeFadeStepSize (float) —
  • afFreq (float) —
  • afFreqFadeStepSize (float) —
  • abLoop (bool) —
  • abResume (bool) —

Returns:

  • bool

cSound_PlaySoundEntityGui

cSoundEntry@ cSound_PlaySoundEntityGui(const tString &in asName,
                                       bool abLoop,
                                       float afVolume,
                                       eSoundEntryType aEntryType,
                                       const cVector3f &in avPos)


Parameters

Returns:

  • cSoundEntry@

cSound_PlaySoundEvent

cSoundEntry@ cSound_PlaySoundEvent(const tString &in asInternalPath,
                                   float afVolume,
                                   const cVector3f &in avPos,
                                   const cVector3f &in avOrientation,
                                   bool abNonBlockLoad)


Parameters

  • asInternalPath (tString) —
  • afVolume (float) —
  • avPos (cVector3f) —
  • avOrientation (cVector3f) —
  • abNonBlockLoad (bool) —

Returns:

  • cSoundEntry@

cSound_PreloadGroup

void cSound_PreloadGroup(const tString &in asInternalPath,
                         bool abNonBlockingLoad,
                         bool abSubGroups)


Parameters

  • asInternalPath (tString) —
  • abNonBlockingLoad (bool) —
  • abSubGroups (bool) —

Returns:

  • void

cSound_PreloadProject

void cSound_PreloadProject(const tString &in asName,
                           bool abNonBlockingLoad)


Parameters

  • asName (tString) —
  • abNonBlockingLoad (bool) —

Returns:

  • void

cSound_PreloadSoundEvent

void cSound_PreloadSoundEvent(const tString &in asInternalPath)


Parameters

Returns:

  • void

cSound_ResumeAll

void cSound_ResumeAll(uint mTypes)


Parameters

  • mTypes (uint) —

Returns:

  • void

cSound_ResumeMusic

void cSound_ResumeMusic()

Returns:

  • void

cSound_SetEventCategory_Gui

void cSound_SetEventCategory_Gui(const tString &in asCat)


Parameters

Returns:

  • void

cSound_SetEventCategory_World

void cSound_SetEventCategory_World(const tString &in asCat)


Parameters

Returns:

  • void

cSound_SetEventCategory_WorldClean

void cSound_SetEventCategory_WorldClean(const tString &in asCat)


Parameters

Returns:

  • void

cSound_SetGlobalSpeed

int cSound_SetGlobalSpeed(float afSpeed,
                          uint mAffectedTypes,
                          int alId)


Parameters

  • afSpeed (float) —
  • mAffectedTypes (uint) —
  • alId (int) —

Returns:

  • int

cSound_SetGlobalVolume

int cSound_SetGlobalVolume(float afVolume,
                           uint mAffectedTypes,
                           int alId)


Parameters

  • afVolume (float) —
  • mAffectedTypes (uint) —
  • alId (int) —

Returns:

  • int

cSound_SetMusicVolumeMul

void cSound_SetMusicVolumeMul(float afMul)


Parameters

  • afMul (float) —

Returns:

  • void

cSound_SetSilent

void cSound_SetSilent(bool abX)


Parameters

  • abX (bool) —

Returns:

  • void

cSound_Stop

bool cSound_Stop(const tString &in asName,
                 bool abPlayEnd)


Parameters

  • asName (tString) —
  • abPlayEnd (bool) —

Returns:

  • bool

cSound_StopAll

void cSound_StopAll(uint mTypes,
                    bool abPlayEnd)


Parameters

  • mTypes (uint) —
  • abPlayEnd (bool) —

Returns:

  • void

cSound_StopMusic

void cSound_StopMusic(float afFadeStepSize)


Parameters

  • afFadeStepSize (float) —

Returns:

  • void