xoreos  0.0.5
Classes | Public Member Functions | Static Public Member Functions | Private Types | Private Member Functions | Private Attributes | Static Private Attributes | List of all members
Sound::SoundManager Class Reference

The sound manager. More...

#include <sound.h>

Inheritance diagram for Sound::SoundManager:
Inheritance graph
[legend]
Collaboration diagram for Sound::SoundManager:
Collaboration graph
[legend]

Classes

struct  Channel
 A sound channel. More...
 
struct  Type
 A sound type. More...
 

Public Member Functions

 SoundManager ()
 
 ~SoundManager ()
 
void init ()
 Initialize the sound subsystem. More...
 
void deinit ()
 Deinitialize the sound subsystem. More...
 
bool ready () const
 Was the sound subsystem successfully initialized? More...
 
void triggerUpdate ()
 Signal that one of streams currently being played has changed and should be updated immediately. More...
 
bool isValidChannel (const ChannelHandle &handle) const
 Does this channel handle point to an existing channel? More...
 
bool isPlaying (const ChannelHandle &handle)
 Is that channel currently playing a sound? More...
 
bool isPaused (const ChannelHandle &handle)
 Is that channel currently paused? More...
 
uint64 getChannelSamplesPlayed (const ChannelHandle &handle)
 Return the number of samples this channel has already played. More...
 
uint64 getChannelDurationPlayed (const ChannelHandle &handle)
 Return the time this channel has already played in milliseconds. More...
 
ChannelHandle playSoundFile (Common::SeekableReadStream *wavStream, SoundType type, bool loop=false)
 Play a sound file. More...
 
ChannelHandle playAudioStream (AudioStream *audStream, SoundType type, bool disposeAfterUse=true)
 Play an audio stream. More...
 
void startChannel (ChannelHandle &handle)
 Start the channel. More...
 
void pauseChannel (ChannelHandle &handle, bool pause)
 Pause the channel. More...
 
void pauseChannel (ChannelHandle &handle)
 Pause toggle the channel. More...
 
void stopChannel (ChannelHandle &handle)
 Stop and free the channel. More...
 
void pauseAll (bool pause)
 Pause all channels. More...
 
void stopAll ()
 Stop all channels. More...
 
void setListenerGain (float gain)
 Set the gain of the listener (= the global master volume). More...
 
void setListenerPosition (float x, float y, float z)
 Set the position of the listener. More...
 
void setListenerOrientation (float dirX, float dirY, float dirZ, float upX, float upY, float upZ)
 Set the orientation of the listener. More...
 
void setChannelPosition (const ChannelHandle &handle, float x, float y, float z)
 Set the position the channel is being played. More...
 
void getChannelPosition (const ChannelHandle &handle, float &x, float &y, float &z)
 Get the position of the channel. More...
 
void setChannelGain (const ChannelHandle &handle, float gain)
 Set the gain/volume of the channel. More...
 
void setChannelPitch (const ChannelHandle &handle, float pitch)
 Set the pitch of the channel. More...
 
void setChannelRelative (const ChannelHandle &handle, bool relative)
 Set if the channel is relative. More...
 
void setChannelDistance (const ChannelHandle &handle, float minDistance, float maxDistance)
 Set the min and max distance for the channel. More...
 
void setTypeGain (SoundType type, float gain)
 Set the gain/volume of all channels of a specific type. More...
 
Common::UString formatChannel (const ChannelHandle &handle) const
 Return a string representing the channel referenced by this handle. More...
 
- Public Member Functions inherited from Common::Thread
 Thread ()
 
virtual ~Thread ()
 
bool createThread (const UString &name="")
 
bool destroyThread ()
 

Static Public Member Functions

static AudioStreammakeAudioStream (Common::SeekableReadStream *stream)
 Create an audio stream from this data stream. More...
 
- Static Public Member Functions inherited from Common::Singleton< SoundManager >
static SoundManager & instance ()
 
static void destroy ()
 

Private Types

typedef std::list< Channel * > TypeList
 

Private Member Functions

void checkReady ()
 Check that the SoundManager was properly initialized. More...
 
void update ()
 Update the sound information. More...
 
ChannelHandle newChannel ()
 Look for a free place in the channel vector. More...
 
void bufferData (Channel &channel)
 Buffer more sound from the channel to the OpenAL buffers. More...
 
void bufferData (size_t channel)
 Buffer more sound from the channel to the OpenAL buffers. More...
 
bool isPlaying (size_t channel) const
 Is that channel currently playing a sound? More...
 
void pauseChannel (Channel *channel, bool pause)
 Pause/Unpause a channel. More...
 
void pauseChannel (Channel *channe)
 Pause toggle channel. More...
 
void freeChannel (ChannelHandle &handle)
 Stop and free a channel. More...
 
void freeChannel (size_t channel)
 Stop and free a channel. More...
 
const ChannelgetChannel (const ChannelHandle &handle) const
 Return the channel the handle refers to. More...
 
ChannelgetChannel (const ChannelHandle &handle)
 Return the channel the handle refers to. More...
 
void threadMethod ()
 
bool fillBuffer (const Channel &channel, ALuint alBuffer, AudioStream *stream, ALsizei &bufferedSize) const
 Fill the buffer with data from the audio stream. More...
 
Common::UString formatChannel (const Channel *channel) const
 Return a string representing this channel. More...
 

Private Attributes

bool _ready
 Was the sound subsystem successfully initialized? More...
 
bool _hasSound
 Do we have working sound output? More...
 
bool _hasMultiChannel
 Do we have the multi-channel extension? More...
 
ALenum _format51
 The value for the 5.1 multi-channel format. More...
 
Common::ScopedPtr< Channel_channels [kChannelCount]
 The sound channels. More...
 
Type _types [kSoundTypeMAX]
 The sound types. More...
 
uint32 _curID
 The ID the next sound will get. More...
 
Common::Mutex _mutex
 
Common::Condition _needUpdate
 Condition to signal that an update is needed. More...
 
ALCdevice * _dev
 
ALCcontext * _ctx
 

Static Private Attributes

static const size_t kChannelCount = 65535
 Maximal number of channels. More...
 

Additional Inherited Members

- Protected Types inherited from Common::Singleton< SoundManager >
typedef SoundManager SingletonBaseType
 
- Protected Member Functions inherited from Common::Singleton< SoundManager >
 Singleton ()
 
virtual ~Singleton ()
 
- Protected Attributes inherited from Common::Thread
boost::atomic< bool > _killThread
 

Detailed Description

The sound manager.

Definition at line 60 of file sound.h.

Member Typedef Documentation

◆ TypeList

typedef std::list<Channel *> Sound::SoundManager::TypeList
private

Definition at line 192 of file sound.h.

Constructor & Destructor Documentation

◆ SoundManager()

Sound::SoundManager::SoundManager ( )

Definition at line 75 of file sound.cpp.

◆ ~SoundManager()

Sound::SoundManager::~SoundManager ( )

Definition at line 78 of file sound.cpp.

Member Function Documentation

◆ bufferData() [1/2]

void Sound::SoundManager::bufferData ( Channel channel)
private

Buffer more sound from the channel to the OpenAL buffers.

Definition at line 729 of file sound.cpp.

References _hasSound, Sound::SoundManager::Channel::bufferSize, error(), fillBuffer(), Sound::SoundManager::Channel::finishedBuffers, formatChannel(), Sound::SoundManager::Channel::freeBuffers, kOpenALBufferCount, Sound::SoundManager::Channel::source, and Sound::SoundManager::Channel::stream.

Referenced by bufferData(), getChannelSamplesPlayed(), and update().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ bufferData() [2/2]

void Sound::SoundManager::bufferData ( size_t  channel)
private

Buffer more sound from the channel to the OpenAL buffers.

Definition at line 722 of file sound.cpp.

References _channels, bufferData(), and kChannelCount.

Here is the call graph for this function:

◆ checkReady()

void Sound::SoundManager::checkReady ( )
private

Check that the SoundManager was properly initialized.

Definition at line 780 of file sound.cpp.

References _ready.

Referenced by playAudioStream(), playSoundFile(), setListenerGain(), setListenerOrientation(), setListenerPosition(), and triggerUpdate().

Here is the caller graph for this function:

◆ deinit()

void Sound::SoundManager::deinit ( )

Deinitialize the sound subsystem.

Definition at line 136 of file sound.cpp.

References _ctx, _dev, _hasSound, _ready, Common::Thread::destroyThread(), freeChannel(), and kChannelCount.

Here is the call graph for this function:

◆ fillBuffer()

bool Sound::SoundManager::fillBuffer ( const Channel channel,
ALuint  alBuffer,
AudioStream stream,
ALsizei &  bufferedSize 
) const
private

Fill the buffer with data from the audio stream.

Definition at line 662 of file sound.cpp.

References _format51, _hasMultiChannel, _hasSound, Sound::AudioStream::endOfData(), error(), formatChannel(), Common::ScopedPtrBase< T, Deallocator >::get(), Sound::AudioStream::getChannels(), Sound::AudioStream::getRate(), kOpenALBufferSize, Sound::AudioStream::kSizeInvalid, Sound::AudioStream::readBuffer(), and warning().

Referenced by bufferData(), and playAudioStream().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ formatChannel() [1/2]

Common::UString Sound::SoundManager::formatChannel ( const ChannelHandle handle) const

Return a string representing the channel referenced by this handle.

Definition at line 915 of file sound.cpp.

References getChannel().

Referenced by bufferData(), fillBuffer(), getChannelPosition(), isPlaying(), pauseChannel(), playAudioStream(), setChannelPosition(), startChannel(), and stopChannel().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ formatChannel() [2/2]

Common::UString Sound::SoundManager::formatChannel ( const Channel channel) const
private

Return a string representing this channel.

Definition at line 908 of file sound.cpp.

References Common::composeString(), Sound::SoundManager::Channel::id, and Sound::SoundManager::Channel::index.

Here is the call graph for this function:

◆ freeChannel() [1/2]

void Sound::SoundManager::freeChannel ( ChannelHandle handle)
private

Stop and free a channel.

Definition at line 860 of file sound.cpp.

References _channels, Sound::ChannelHandle::channel, Sound::ChannelHandle::id, kChannelCount, and Sound::kChannelInvalid.

Referenced by deinit(), stopAll(), stopChannel(), and update().

Here is the caller graph for this function:

◆ freeChannel() [2/2]

void Sound::SoundManager::freeChannel ( size_t  channel)
private

◆ getChannel() [1/2]

const SoundManager::Channel * Sound::SoundManager::getChannel ( const ChannelHandle handle) const
private

◆ getChannel() [2/2]

SoundManager::Channel * Sound::SoundManager::getChannel ( const ChannelHandle handle)
private

Return the channel the handle refers to.

Definition at line 437 of file sound.cpp.

References _channels, Sound::ChannelHandle::channel, Sound::ChannelHandle::id, and kChannelCount.

◆ getChannelDurationPlayed()

uint64 Sound::SoundManager::getChannelDurationPlayed ( const ChannelHandle handle)

Return the time this channel has already played in milliseconds.

Definition at line 635 of file sound.cpp.

References _mutex, getChannel(), getChannelSamplesPlayed(), and Sound::SoundManager::Channel::stream.

Here is the call graph for this function:

◆ getChannelPosition()

void Sound::SoundManager::getChannelPosition ( const ChannelHandle handle,
float &  x,
float &  y,
float &  z 
)

Get the position of the channel.

Definition at line 551 of file sound.cpp.

References _hasSound, _mutex, Common::UString::c_str(), formatChannel(), getChannel(), Sound::SoundManager::Channel::source, and Sound::SoundManager::Channel::stream.

Here is the call graph for this function:

◆ getChannelSamplesPlayed()

uint64 Sound::SoundManager::getChannelSamplesPlayed ( const ChannelHandle handle)

Return the number of samples this channel has already played.

Definition at line 614 of file sound.cpp.

References _mutex, bufferData(), Sound::SoundManager::Channel::finishedBuffers, getChannel(), Sound::SoundManager::Channel::source, and Sound::SoundManager::Channel::stream.

Referenced by getChannelDurationPlayed().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ init()

void Sound::SoundManager::init ( )

◆ isPaused()

bool Sound::SoundManager::isPaused ( const ChannelHandle handle)

Is that channel currently paused?

Definition at line 232 of file sound.cpp.

References _channels, _mutex, Sound::ChannelHandle::channel, and Sound::ChannelHandle::id.

◆ isPlaying() [1/2]

bool Sound::SoundManager::isPlaying ( const ChannelHandle handle)

Is that channel currently playing a sound?

Definition at line 174 of file sound.cpp.

References _channels, _mutex, Sound::ChannelHandle::channel, Sound::ChannelHandle::id, and kChannelCount.

Referenced by update().

Here is the caller graph for this function:

◆ isPlaying() [2/2]

bool Sound::SoundManager::isPlaying ( size_t  channel) const
private

Is that channel currently playing a sound?

Definition at line 186 of file sound.cpp.

References _channels, _hasSound, error(), formatChannel(), and kChannelCount.

Here is the call graph for this function:

◆ isValidChannel()

bool Sound::SoundManager::isValidChannel ( const ChannelHandle handle) const

Does this channel handle point to an existing channel?

Definition at line 164 of file sound.cpp.

References _channels, Sound::ChannelHandle::channel, Sound::ChannelHandle::id, and kChannelCount.

Referenced by stopChannel().

Here is the caller graph for this function:

◆ makeAudioStream()

AudioStream * Sound::SoundManager::makeAudioStream ( Common::SeekableReadStream stream)
static

Create an audio stream from this data stream.

The ownership of the data stream is transferred to the audio stream if one was created without an exception being thrown.

Definition at line 244 of file sound.cpp.

References Common::debugTag(), Sound::makeASFStream(), Sound::makeMP3Stream(), Sound::makeVorbisStream(), Sound::makeWAVStream(), MKTAG, Common::SeekableReadStream::pos(), Common::ReadStream::readUint32BE(), Common::ReadStream::readUint32LE(), Common::SeekableReadStream::seek(), Common::SeekableReadStream::size(), and Common::SeekableReadStream::skip().

Referenced by playSoundFile().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ newChannel()

ChannelHandle Sound::SoundManager::newChannel ( )
private

Look for a free place in the channel vector.

Definition at line 808 of file sound.cpp.

References _channels, _curID, Sound::ChannelHandle::channel, Sound::ChannelHandle::id, kChannelCount, and Sound::kChannelInvalid.

Referenced by playAudioStream().

Here is the caller graph for this function:

◆ pauseAll()

void Sound::SoundManager::pauseAll ( bool  pause)

Pause all channels.

Definition at line 496 of file sound.cpp.

References _channels, _mutex, kChannelCount, and pauseChannel().

Here is the call graph for this function:

◆ pauseChannel() [1/4]

void Sound::SoundManager::pauseChannel ( ChannelHandle handle,
bool  pause 
)

Pause the channel.

Definition at line 474 of file sound.cpp.

References _mutex, debugC(), formatChannel(), getChannel(), Common::kDebugSound, and Sound::SoundManager::Channel::stream.

Referenced by pauseAll(), and pauseChannel().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ pauseChannel() [2/4]

void Sound::SoundManager::pauseChannel ( ChannelHandle handle)

Pause toggle the channel.

Definition at line 464 of file sound.cpp.

References _mutex, getChannel(), pauseChannel(), and Sound::SoundManager::Channel::stream.

Here is the call graph for this function:

◆ pauseChannel() [3/4]

void Sound::SoundManager::pauseChannel ( Channel channel,
bool  pause 
)
private

Pause/Unpause a channel.

Definition at line 830 of file sound.cpp.

References _hasSound, error(), formatChannel(), Sound::SoundManager::Channel::id, Sound::SoundManager::Channel::source, Sound::SoundManager::Channel::state, triggerUpdate(), and warning().

Here is the call graph for this function:

◆ pauseChannel() [4/4]

void Sound::SoundManager::pauseChannel ( Channel channe)
private

Pause toggle channel.

Definition at line 850 of file sound.cpp.

References pauseChannel(), and Sound::SoundManager::Channel::state.

Here is the call graph for this function:

◆ playAudioStream()

ChannelHandle Sound::SoundManager::playAudioStream ( AudioStream audStream,
SoundType  type,
bool  disposeAfterUse = true 
)

Play an audio stream.

This only allocate a channel for the sound, to actually start playing it, call startChannel().

Parameters
audStreamThe stream to play.
typeThe type of the sound.
disposeAfterUseShould the stream be taken over and discarded once it finished?
Returns
The channel the sound has been assigned to, or -1 on error.

Definition at line 330 of file sound.cpp.

References _channels, _hasSound, _mutex, _types, Sound::SoundManager::Channel::buffers, Sound::SoundManager::Channel::bufferSize, Sound::ChannelHandle::channel, checkReady(), debugC(), error(), fillBuffer(), formatChannel(), Sound::SoundManager::Channel::freeBuffers, Sound::SoundManager::Type::gain, Sound::ChannelHandle::id, Common::kDebugSound, kOpenALBufferCount, Sound::kSoundTypeMAX, Sound::SoundManager::Type::list, newChannel(), Sound::SoundManager::Channel::source, Sound::SoundManager::Channel::stream, Sound::SoundManager::Channel::type, and Sound::SoundManager::Channel::typeIt.

Referenced by playSoundFile().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ playSoundFile()

ChannelHandle Sound::SoundManager::playSoundFile ( Common::SeekableReadStream wavStream,
SoundType  type,
bool  loop = false 
)

Play a sound file.

This only allocate a channel for the sound, to actually start playing it, call startChannel().

Parameters
wavStreamThe stream to play. Will be taken over.
typeThe type of the sound.
loopShould the sound loop?
Returns
The channel the sound has been assigned to, or -1 on error.

Definition at line 402 of file sound.cpp.

References checkReady(), makeAudioStream(), Sound::makeLoopingAudioStream(), playAudioStream(), and warning().

Here is the call graph for this function:

◆ ready()

bool Sound::SoundManager::ready ( ) const

Was the sound subsystem successfully initialized?

Definition at line 154 of file sound.cpp.

References _ready.

◆ setChannelDistance()

void Sound::SoundManager::setChannelDistance ( const ChannelHandle handle,
float  minDistance,
float  maxDistance 
)

Set the min and max distance for the channel.

Definition at line 601 of file sound.cpp.

References _hasSound, _mutex, getChannel(), Sound::SoundManager::Channel::source, and Sound::SoundManager::Channel::stream.

Here is the call graph for this function:

◆ setChannelGain()

void Sound::SoundManager::setChannelGain ( const ChannelHandle handle,
float  gain 
)

◆ setChannelPitch()

void Sound::SoundManager::setChannelPitch ( const ChannelHandle handle,
float  pitch 
)

Set the pitch of the channel.

Definition at line 579 of file sound.cpp.

References _hasSound, _mutex, getChannel(), Sound::SoundManager::Channel::source, and Sound::SoundManager::Channel::stream.

Here is the call graph for this function:

◆ setChannelPosition()

void Sound::SoundManager::setChannelPosition ( const ChannelHandle handle,
float  x,
float  y,
float  z 
)

Set the position the channel is being played.

Definition at line 536 of file sound.cpp.

References _hasSound, _mutex, Common::UString::c_str(), formatChannel(), getChannel(), Sound::SoundManager::Channel::source, and Sound::SoundManager::Channel::stream.

Here is the call graph for this function:

◆ setChannelRelative()

void Sound::SoundManager::setChannelRelative ( const ChannelHandle handle,
bool  relative 
)

Set if the channel is relative.

Definition at line 590 of file sound.cpp.

References _hasSound, _mutex, getChannel(), Sound::SoundManager::Channel::source, and Sound::SoundManager::Channel::stream.

Here is the call graph for this function:

◆ setListenerGain()

void Sound::SoundManager::setListenerGain ( float  gain)

Set the gain of the listener (= the global master volume).

Definition at line 510 of file sound.cpp.

References _hasSound, _mutex, and checkReady().

Referenced by init().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setListenerOrientation()

void Sound::SoundManager::setListenerOrientation ( float  dirX,
float  dirY,
float  dirZ,
float  upX,
float  upY,
float  upZ 
)

Set the orientation of the listener.

Definition at line 527 of file sound.cpp.

References _mutex, and checkReady().

Here is the call graph for this function:

◆ setListenerPosition()

void Sound::SoundManager::setListenerPosition ( float  x,
float  y,
float  z 
)

Set the position of the listener.

Definition at line 519 of file sound.cpp.

References _mutex, and checkReady().

Here is the call graph for this function:

◆ setTypeGain()

void Sound::SoundManager::setTypeGain ( SoundType  type,
float  gain 
)

Set the gain/volume of all channels of a specific type.

Definition at line 645 of file sound.cpp.

References _hasSound, _mutex, _types, Sound::SoundManager::Type::gain, Sound::kSoundTypeMAX, and Sound::SoundManager::Type::list.

Referenced by init().

Here is the caller graph for this function:

◆ startChannel()

void Sound::SoundManager::startChannel ( ChannelHandle handle)

Start the channel.

Definition at line 450 of file sound.cpp.

References _mutex, debugC(), formatChannel(), getChannel(), Common::kDebugSound, Sound::SoundManager::Channel::state, Sound::SoundManager::Channel::stream, and triggerUpdate().

Here is the call graph for this function:

◆ stopAll()

void Sound::SoundManager::stopAll ( )

Stop all channels.

Definition at line 503 of file sound.cpp.

References _mutex, freeChannel(), and kChannelCount.

Here is the call graph for this function:

◆ stopChannel()

void Sound::SoundManager::stopChannel ( ChannelHandle handle)

Stop and free the channel.

Definition at line 487 of file sound.cpp.

References _mutex, debugC(), formatChannel(), freeChannel(), isValidChannel(), and Common::kDebugSound.

Here is the call graph for this function:

◆ threadMethod()

void Sound::SoundManager::threadMethod ( )
privatevirtual

Implements Common::Thread.

Definition at line 901 of file sound.cpp.

References Common::Thread::_killThread, _needUpdate, update(), and Common::Condition::wait().

Here is the call graph for this function:

◆ triggerUpdate()

void Sound::SoundManager::triggerUpdate ( )

Signal that one of streams currently being played has changed and should be updated immediately.

Definition at line 158 of file sound.cpp.

References _needUpdate, checkReady(), and Common::Condition::signal().

Referenced by pauseChannel(), and startChannel().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ update()

void Sound::SoundManager::update ( )
private

Update the sound information.

Called regularly from within the thread method.

Definition at line 785 of file sound.cpp.

References _channels, _mutex, bufferData(), Common::composeString(), debugC(), freeChannel(), isPlaying(), kChannelCount, and Common::kDebugSound.

Referenced by threadMethod().

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ _channels

Common::ScopedPtr<Channel> Sound::SoundManager::_channels[kChannelCount]
private

The sound channels.

Definition at line 235 of file sound.h.

Referenced by bufferData(), freeChannel(), getChannel(), isPaused(), isPlaying(), isValidChannel(), newChannel(), pauseAll(), playAudioStream(), and update().

◆ _ctx

ALCcontext* Sound::SoundManager::_ctx
private

Definition at line 246 of file sound.h.

Referenced by deinit(), and init().

◆ _curID

uint32 Sound::SoundManager::_curID
private

The ID the next sound will get.

Definition at line 238 of file sound.h.

Referenced by init(), and newChannel().

◆ _dev

ALCdevice* Sound::SoundManager::_dev
private

Definition at line 245 of file sound.h.

Referenced by deinit(), and init().

◆ _format51

ALenum Sound::SoundManager::_format51
private

The value for the 5.1 multi-channel format.

Definition at line 233 of file sound.h.

Referenced by fillBuffer(), and init().

◆ _hasMultiChannel

bool Sound::SoundManager::_hasMultiChannel
private

Do we have the multi-channel extension?

Definition at line 232 of file sound.h.

Referenced by fillBuffer(), and init().

◆ _hasSound

bool Sound::SoundManager::_hasSound
private

◆ _mutex

Common::Mutex Sound::SoundManager::_mutex
private

◆ _needUpdate

Common::Condition Sound::SoundManager::_needUpdate
private

Condition to signal that an update is needed.

Definition at line 243 of file sound.h.

Referenced by threadMethod(), and triggerUpdate().

◆ _ready

bool Sound::SoundManager::_ready
private

Was the sound subsystem successfully initialized?

Definition at line 228 of file sound.h.

Referenced by checkReady(), deinit(), init(), and ready().

◆ _types

Type Sound::SoundManager::_types[kSoundTypeMAX]
private

The sound types.

Definition at line 236 of file sound.h.

Referenced by freeChannel(), init(), playAudioStream(), setChannelGain(), and setTypeGain().

◆ kChannelCount

const size_t Sound::SoundManager::kChannelCount = 65535
staticprivate

Maximal number of channels.

Definition at line 190 of file sound.h.

Referenced by bufferData(), deinit(), freeChannel(), getChannel(), isPlaying(), isValidChannel(), newChannel(), pauseAll(), stopAll(), and update().


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