#include <Sound.h>
Class Sound
Inherits from ListenerObject
Implements sound playback.
Definition at line 83 of file Sound.h.
# SoundROMSpec
A Sound spec that is stored in ROM
Definition at line 72 of file Sound.h.
# SoundPlaybackTypes
# SoundState
# autoReleaseOnFinish()
void Sound::autoReleaseOnFinish |
( |
bool | autoReleaseOnFinish | ) |
|
Set the flag that allows the sound to auto release itself when playback is complete.
- Parameters
-
autoReleaseOnFinish | If true, the sound is released when playaback is complete |
# constructor()
Class' constructor
- Parameters
-
soundSpec | Specification that determines how to configure the sound |
soundReleaseListener | Callback for when the sound is released |
scope | Object that will be notified of sound events |
Definition at line 72 of file Sound.c.
# getFrequencyDelta()
uint16 Sound::getFrequencyDelta |
( |
| ) |
|
Retrieve the frequency delta added to the VSU's frequency registers.
Definition at line 451 of file Sound.c.
# getSpec()
Retrieve the spec pointer that defined how to initialized the sound
- Returns
- Sound spec pointer
Definition at line 132 of file Sound.c.
# getSpeed()
Retrieve the playback's speed.
- Returns
- Target playback speed
Definition at line 425 of file Sound.c.
# isFadingIn()
bool Sound::isFadingIn |
( |
| ) |
|
Check if the sound is fading in.
- Returns
- True if playback fading in
Definition at line 472 of file Sound.c.
# isFadingOut()
bool Sound::isFadingOut |
( |
| ) |
|
Check if the sound is fading out.
- Returns
- True if playback fading out
Definition at line 479 of file Sound.c.
# isPaused()
Check if the sound is paused.
- Returns
- True if playback is paused
Definition at line 465 of file Sound.c.
# isPlaying()
bool Sound::isPlaying |
( |
| ) |
|
Check if the sound is playing.
- Returns
- True if playback is going on
Definition at line 458 of file Sound.c.
# lock()
Prevent other requests to get a sound to steal this sound's sources.
Definition at line 393 of file Sound.c.
# mute()
Mute the sound.
Definition at line 337 of file Sound.c.
# pause()
Pause the playback.
Definition at line 229 of file Sound.c.
# play()
Play the sound.
- Parameters
-
position | Pointer to the spatial position of the sound |
playbackType | Specifies how the playback should start |
Definition at line 139 of file Sound.c.
# print()
Print the sounds's properties.
- Parameters
-
x | Screen x coordinate where to print |
y | Screen y coordinate where to print |
Definition at line 625 of file Sound.c.
# printPlaybackProgress()
void Sound::printPlaybackProgress |
( |
int32 | x, |
|
|
int32 | y ) |
Print the sounds's playback progress.
- Parameters
-
x | Screen x coordinate where to print |
y | Screen y coordinate where to print |
Definition at line 694 of file Sound.c.
# printPlaybackTime()
void Sound::printPlaybackTime |
( |
int32 | x, |
|
|
int32 | y ) |
Print the sounds's playback time.
- Parameters
-
x | Screen x coordinate where to print |
y | Screen y coordinate where to print |
Definition at line 666 of file Sound.c.
# release()
Release this sound.
Definition at line 378 of file Sound.c.
# resume()
Resume the output of sound.
Definition at line 310 of file Sound.c.
# rewind()
Rewind the playack.
Definition at line 351 of file Sound.c.
# setFrequencyDelta()
void Sound::setFrequencyDelta |
( |
uint16 | frequencyDelta | ) |
|
Set the frequency delta to be added to the VSU's frequency registers.
- Parameters
-
frequencyDelta | Delta to be added to the frequency |
Definition at line 444 of file Sound.c.
# setMirror()
static void Sound::setMirror |
( |
Mirror | mirror | ) |
|
|
static |
Mirror the spatial positioning of the sound.
- Parameters
-
mirror | Struct with a flag for each axis to mirror |
Definition at line 59 of file Sound.c.
# setSpeed()
Set the playback's speed.
- Parameters
-
speed | Target playback speed |
Definition at line 414 of file Sound.c.
# setVolumenScalePower()
void Sound::setVolumenScalePower |
( |
uint8 | volumenScalePower | ) |
|
Set the factor (2's power) by which the final volume is reduced.
- Parameters
-
volumenScalePower | Factor by which the final volume is reduced |
Definition at line 432 of file Sound.c.
# stop()
Stop the playback.
Definition at line 205 of file Sound.c.
# suspend()
Suspend the output of sound.
Definition at line 283 of file Sound.c.
# unlock()
Allow other requests to get a sound to steal this sound's sources.
Definition at line 400 of file Sound.c.
# unmute()
# unpause()
Unpause the playback.
Definition at line 256 of file Sound.c.
# update()
void Sound::update |
( |
uint32 | elapsedMicroseconds, |
|
|
uint32 | targetPCMUpdates ) |
Advance the playback on the sound's native tracks.
- Parameters
-
elapsedMicroseconds | Elapsed time since the last call |
targetPCMUpdates | Ideal Elapsed time since the last call |
Definition at line 522 of file Sound.c.
# updatePlaybackState()
bool Sound::updatePlaybackState |
( |
| ) |
|
Update the sound playback state.
- Returns
- False if the sound has been released
Definition at line 486 of file Sound.c.
# autoReleaseOnFinish
void Sound::autoReleaseOnFinish |
|
protected |
If true, the sound is released when playback is complete.
Definition at line 139 of file Sound.h.
# frequencyDelta
Delta added to the frequency registers.
Definition at line 121 of file Sound.h.
# locked
If locked, it cannot be released by external calls.
Definition at line 142 of file Sound.h.
# mainSoundTrack
Main sound track.
Definition at line 97 of file Sound.h.
# pcmTargetPlaybackRefreshRate
uint16 Sound::pcmTargetPlaybackRefreshRate |
|
protected |
Target refresh rate for PCM playback.
Definition at line 118 of file Sound.h.
# playbackType
uint8 Sound::playbackType |
|
protected |
# position
Pointer to vector for spatial positioning of the sound.
Definition at line 91 of file Sound.h.
# previouslyElapsedTicks
uint32 Sound::previouslyElapsedTicks |
|
protected |
Elapsed ticks in the previous update.
Definition at line 112 of file Sound.h.
# soundSpec
Pointer to the spec that defines how to initialize the sound.
Definition at line 88 of file Sound.h.
# soundTracks
List of sound tracks.
Definition at line 94 of file Sound.h.
# speed
Playback speed.
Definition at line 100 of file Sound.h.
# state
# targetTimerResolutionFactor
Factor to apply to the tick step.
Definition at line 106 of file Sound.h.
# tickStep
Tick step per timer interrupt.
Definition at line 109 of file Sound.h.
# totalPlaybackMilliseconds
uint32 Sound::totalPlaybackMilliseconds |
|
protected |
Total playback time.
Definition at line 115 of file Sound.h.
# unmute
If true, sound is not muted.
Definition at line 136 of file Sound.h.
# volumenScalePower
uint8 Sound::volumenScalePower |
|
protected |
2's power to divide to the final volume value
Definition at line 130 of file Sound.h.
# volumeReduction
int8 Sound::volumeReduction |
|
protected |
Volume reduction used for fade effects.
Definition at line 127 of file Sound.h.
# volumeReductionMultiplier
uint16 Sound::volumeReductionMultiplier |
|
protected |
Multiplier used for fade effects.
Definition at line 124 of file Sound.h.
The documentation for this class was generated from the following files: