50 #if AUDIO_TK == AUDIO_TK_SDL_MIXER
80 #if AUDIO_TK == AUDIO_TK_OPENAL
133 DebugLogF(
"Warning: could not find sound matching '%s'", szSndName);
137 return csfx->
New(fLoop, iVolume, pObj, iCustomFalloffDistance, iPitch, modifier);
151 if (pInst)
return pInst;
180 if (nsfx->
Load(szFilename, hGroup, namespace_prefix))
202 if (namespace_prefix)
204 sub_namespace.
Copy(namespace_prefix);
205 sub_namespace.
Append(
"::");
210 if (subgroup.
OpenAsChild(&hGroup, szFilename,
false,
false))
229 if (pPrev) pPrev->
Next=pNext;
242 pEff->ClearPointers(pObj);
249 if (pSfx->FirstInst)
return pSfx->FirstInst;
259 if (pSfx->FirstInst)
return pSfx->FirstInst;
#define C4CFN_SoundSubgroups
C4Application Application
bool DebugLogF(const char *strMessage ...)
uint32_t UnsyncedRandom()
void SoundUpdate(C4SoundInstance *pInst, int32_t iLevel, int32_t iPitch)
void StopSoundEffect(const char *szSndName, C4Object *pObj)
C4SoundInstance * GetSoundInstance(const char *szSndName, C4Object *pObj)
void SoundPitch(const char *szSndName, C4Object *pObj, int32_t iPitch)
C4SoundInstance * StartSoundEffect(const char *szSndName, bool fLoop, int32_t iVolume, C4Object *pObj, int32_t iCustomFalloffDistance, int32_t iPitch, C4SoundModifier *modifier)
void SoundPan(const char *szSndName, C4Object *pObj, int32_t iPan)
void SoundLevel(const char *szSndName, C4Object *pObj, int32_t iLevel)
C4SoundInstance * StartSoundEffectAt(const char *szSndName, int32_t iX, int32_t iY, int32_t iVolume, int32_t iCustomFallofDistance, int32_t iPitch, C4SoundModifier *modifier)
const int32_t C4MaxSoundInstances
const int32_t C4MaxSoundName
bool SCopySegment(const char *szString, int iSegment, char *sTarget, char cSeparator, int iMaxL, bool fSkipWhitespace)
void SCopy(const char *szSource, char *sTarget, size_t iMaxL)
bool WildcardMatch(const char *szWildcard, const char *szString)
void DefaultExtension(char *szFilename, const char *szExtension)
bool IsWildcardString(const char *szString)
C4MusicSystem MusicSystem
C4SoundSystem SoundSystem
bool FindNextEntry(const char *wildcard, StdStrBuf *filename=nullptr, size_t *size=nullptr, bool start_at_filename=false)
bool OpenAsChild(C4Group *mother, const char *entry_name, bool is_exclusive=false, bool do_create=false)
void ResetSearch(bool reload_contents=false)
bool FindEntry(const char *wildcard, StdStrBuf *filename=nullptr, size_t *size=nullptr)
bool Open(C4Group &group, const char *filename) const
bool Load(const char *szFileName, C4Group &hGroup, const char *namespace_prefix)
C4SoundInstance * New(bool fLoop=false, int32_t iVolume=100, C4Object *pObj=nullptr, int32_t iCustomFalloffDistance=0, int32_t iPitch=0, C4SoundModifier *modifier=nullptr)
char Name[C4MaxSoundName+1]
void SetVolume(int32_t inVolume)
void SetVolumeByPos(int32_t x, int32_t y, int32_t relative_volume=100)
void SetPitch(int32_t inPitch)
void SetPan(int32_t inPan)
int32_t RemoveEffect(const char *szFilename)
C4SoundEffect * FirstSound
C4SoundInstance * FindInstance(const char *szSound, C4Object *pObj)
C4SoundInstance * GetFirstInstance() const
C4SoundInstance * GetNextInstance(C4SoundInstance *prev) const
C4SoundModifierList Modifiers
void ClearPointers(C4Object *pObj)
int32_t LoadEffects(C4Group &hGroup, const char *namespace_prefix, bool group_is_root)
C4SoundEffect * GetEffect(const char *szSound)
C4SoundInstance * NewEffect(const char *szSound, bool fLoop=false, int32_t iVolume=100, C4Object *pObj=nullptr, int32_t iCustomFalloffDistance=0, int32_t iPitch=0, C4SoundModifier *modifier=nullptr)
const char * getData() const
void Append(const char *pnData, size_t iChars)