RedCore
Loading...
Searching...
No Matches
red::SoundObject Class Reference

#include <AudioObject.h>

Inherits NMSndObjectBase.

Inherited by red::AudioObject.

Public Member Functions

 SoundObject (AudAudioPlayer *player, nw::snd::OutputLine outputLine=nw::snd::OutputLine::OUTPUT_LINE_MAIN)
nw::snd::SoundHandle * startSound (const char *label, nw::snd::OutputLine outputLine=nw::snd::OutputLine::OUTPUT_LINE_MAIN)
nw::snd::SoundHandle * holdSound (const char *label, nw::snd::OutputLine outputLine=nw::snd::OutputLine::OUTPUT_LINE_MAIN)
virtual nw::snd::SoundHandle * startSound (const char *label, const sead::Vector2f &pos, nw::snd::OutputLine outputLine=nw::snd::OutputLine::OUTPUT_LINE_MAIN)
virtual nw::snd::SoundHandle * holdSound (const char *label, const sead::Vector2f &pos, nw::snd::OutputLine outputLine=nw::snd::OutputLine::OUTPUT_LINE_MAIN)
virtual void calc (const sead::Vector2f &pos)
void sendRemote (nw::snd::SoundHandle *handle, const char *label, nw::snd::OutputLine outputLine)
void setSoundPosition (nw::snd::SoundHandle *handle, const sead::Vector2f &pos)

Static Public Attributes

static const u32 cPlayableSoundNum = 12
static const u32 cHandleNum = cPlayableSoundNum + cExtraHandleNum

Protected Member Functions

nw::snd::SoundHandle * startSound_ (const char *label, nw::snd::OutputLine outputLine)
nw::snd::SoundHandle * holdSound_ (const char *label, nw::snd::OutputLine outputLine)
nw::snd::SoundHandle * startSound_ (const char *label, const sead::Vector2f &pos, nw::snd::OutputLine outputLine)
nw::snd::SoundHandle * holdSound_ (const char *label, const sead::Vector2f &pos, nw::snd::OutputLine outputLine)
nw::snd::SoundHandle * getFreeHandle_ ()
nw::snd::SoundHandle * findHandle_ (const char *label)

Protected Attributes

AudAudioPlayer * mAudioPlayer
nw::snd::SoundHandle mHandles [cHandleNum]
sead::Vector2f mPos

Constructor & Destructor Documentation

◆ SoundObject()

red::SoundObject::SoundObject ( AudAudioPlayer * player,
nw::snd::OutputLine outputLine = nw::snd::OutputLine::OUTPUT_LINE_MAIN )

Member Function Documentation

◆ startSound() [1/2]

nw::snd::SoundHandle * red::SoundObject::startSound ( const char * label,
nw::snd::OutputLine outputLine = nw::snd::OutputLine::OUTPUT_LINE_MAIN )
inline

◆ holdSound() [1/2]

nw::snd::SoundHandle * red::SoundObject::holdSound ( const char * label,
nw::snd::OutputLine outputLine = nw::snd::OutputLine::OUTPUT_LINE_MAIN )
inline

◆ startSound() [2/2]

virtual nw::snd::SoundHandle * red::SoundObject::startSound ( const char * label,
const sead::Vector2f & pos,
nw::snd::OutputLine outputLine = nw::snd::OutputLine::OUTPUT_LINE_MAIN )
inlinevirtual

Reimplemented in red::AudioObject.

◆ holdSound() [2/2]

virtual nw::snd::SoundHandle * red::SoundObject::holdSound ( const char * label,
const sead::Vector2f & pos,
nw::snd::OutputLine outputLine = nw::snd::OutputLine::OUTPUT_LINE_MAIN )
inlinevirtual

Reimplemented in red::AudioObject.

◆ calc()

virtual void red::SoundObject::calc ( const sead::Vector2f & pos)
virtual

Reimplemented in red::AudioObject.

◆ sendRemote()

void red::SoundObject::sendRemote ( nw::snd::SoundHandle * handle,
const char * label,
nw::snd::OutputLine outputLine )

◆ setSoundPosition()

void red::SoundObject::setSoundPosition ( nw::snd::SoundHandle * handle,
const sead::Vector2f & pos )

◆ startSound_() [1/2]

nw::snd::SoundHandle * red::SoundObject::startSound_ ( const char * label,
nw::snd::OutputLine outputLine )
protected

◆ holdSound_() [1/2]

nw::snd::SoundHandle * red::SoundObject::holdSound_ ( const char * label,
nw::snd::OutputLine outputLine )
protected

◆ startSound_() [2/2]

nw::snd::SoundHandle * red::SoundObject::startSound_ ( const char * label,
const sead::Vector2f & pos,
nw::snd::OutputLine outputLine )
protected

◆ holdSound_() [2/2]

nw::snd::SoundHandle * red::SoundObject::holdSound_ ( const char * label,
const sead::Vector2f & pos,
nw::snd::OutputLine outputLine )
protected

◆ getFreeHandle_()

nw::snd::SoundHandle * red::SoundObject::getFreeHandle_ ( )
protected

◆ findHandle_()

nw::snd::SoundHandle * red::SoundObject::findHandle_ ( const char * label)
protected

Member Data Documentation

◆ cPlayableSoundNum

const u32 red::SoundObject::cPlayableSoundNum = 12
static

◆ cHandleNum

const u32 red::SoundObject::cHandleNum = cPlayableSoundNum + cExtraHandleNum
static

◆ mAudioPlayer

AudAudioPlayer* red::SoundObject::mAudioPlayer
protected

◆ mHandles

nw::snd::SoundHandle red::SoundObject::mHandles[cHandleNum]
protected

◆ mPos

sead::Vector2f red::SoundObject::mPos
protected