SoundTrack Class Reference
#include <SoundTrack.h>
![](../class_sound_track.png)
# Public Types | |
enum | SoundTrackTypes |
enum | SoundEvents |
typedef const SoundTrackSpec | SoundTrackROMSpec |
# Public Member Functions | |
void | constructor (const SoundTrackSpec *soundTrackSpec) |
void | start (bool wasPaused) |
void | stop () |
Stop the playback. | |
void | pause () |
Pause the playback. | |
void | unpause () |
Unpause the playback. | |
void | suspend () |
Suspend the output of sound. | |
void | resume () |
Resume the output of sound. | |
void | rewind () |
Rewind the track. | |
bool | update (uint32 elapsedMicroseconds, uint32 targetPCMUpdates, fix7_9_ext tickStep, fix7_9_ext targetTimerResolutionFactor, fixed_t leftVolumeFactor, fixed_t rightVolumeFactor, int8 volumeReduction, uint8 volumenScalePower, uint16 frequencyDelta) |
uint32 | getTicks () |
float | getElapsedTicksPercentaje () |
uint32 | getTotalPlaybackMilliseconds (uint16 targetTimerResolutionUS) |
# Static Public Member Functions | |
static void | setPCMTargetPlaybackRefreshRate (uint16 pcmTargetPlaybackRefreshRate) |
# Protected Attributes | |
const SoundTrackSpec * | soundTrackSpec |
Pointer to the spec that defines how to initialize the soundtrack. | |
uint32 | samples |
Channel's effective length. | |
uint32 | cursor |
Position within the sound track. | |
uint32 | cursorSxINT |
SxINT cursor. | |
uint32 | cursorSxLRV |
SxLRV cursor. | |
uint32 | cursorSxFQ |
SxFQ cursor. | |
uint32 | cursorSxEV0 |
SxEV0 cursor. | |
uint32 | cursorSxEV1 |
SxEV1 cursor. | |
uint32 | cursorSxRAM |
SxRAM cursor. | |
uint32 | cursorSxSWP |
SxSWP cursor. | |
uint32 | cursorSxMOD |
SxMOD cursor. | |
uint32 | ticks |
Total number of ticks. | |
fix7_9_ext | elapsedTicks |
Ticks before moving the cursor. | |
fix7_9_ext | nextElapsedTicksTarget |
Next ticks target. | |
bool | finished |
If true, the playback is complete. |
# Additional Inherited Members | |
![]() | |
void | constructor () |
Class' constructor. | |
const void * | getVTable () |
bool | mutateTo (const void *targetClass) |
![]() | |
static Object | getCast (void *object, ClassPointer targetClassGetClassMethod, ClassPointer baseClassGetClassMethod) |
![]() | |
void * | vTable |
Pointer to the class's virtual table. |
# Detailed Description
Class SoundTrack
Inherits from Object
Implements a sound track.
Definition at line 257 of file SoundTrack.h.
# Member Typedef Documentation
# SoundTrackROMSpec
typedef const SoundTrackSpec SoundTrackROMSpec |
A SoundTrack spec that is stored in ROM
Definition at line 246 of file SoundTrack.h.
# Member Enumeration Documentation
# SoundEvents
enum SoundEvents |
Sound events that the sound player recongnizes
Definition at line 174 of file SoundTrack.h.
# SoundTrackTypes
enum SoundTrackTypes |
Sound track types
Definition at line 166 of file SoundTrack.h.
# Member Function Documentation
# constructor()
void SoundTrack::constructor | ( | const SoundTrackSpec * | soundTrackSpec | ) |
Class' constructor
- Parameters
-
soundTrackSpec Specification that determines how to configure the sound track
Definition at line 191 of file SoundTrack.c.
# getElapsedTicksPercentaje()
float SoundTrack::getElapsedTicksPercentaje | ( | ) |
Retrieve the sound track's percentage of elapsed ticks.
- Returns
- Percentaje of elapsed ticks
Definition at line 155 of file SoundTrack.c.
# getTicks()
uint32 SoundTrack::getTicks | ( | ) |
Retrieve the sound track's total ticks.
- Returns
- Total number of ticks
Definition at line 148 of file SoundTrack.c.
# getTotalPlaybackMilliseconds()
Retrieve the total time of playback in milliseconds.
- Parameters
-
targetTimerResolutionUS Target timer resolution in US
- Returns
- The total time of playback in milliseconds
Definition at line 167 of file SoundTrack.c.
# pause()
void SoundTrack::pause | ( | ) |
Pause the playback.
Definition at line 72 of file SoundTrack.c.
# resume()
void SoundTrack::resume | ( | ) |
Resume the output of sound.
Definition at line 89 of file SoundTrack.c.
# rewind()
void SoundTrack::rewind | ( | ) |
Rewind the track.
Definition at line 94 of file SoundTrack.c.
# setPCMTargetPlaybackRefreshRate()
|
static |
Set the target refresh rate for PCM playback.
- Parameters
-
pcmTargetPlaybackRefreshRate Target refresh rate for PCM playback
Definition at line 34 of file SoundTrack.c.
# start()
void SoundTrack::start | ( | bool | wasPaused | ) |
Start the playback.
- Parameters
-
wasPaused If true, the playback is resuming
Definition at line 47 of file SoundTrack.c.
# stop()
void SoundTrack::stop | ( | ) |
Stop the playback.
Definition at line 62 of file SoundTrack.c.
# suspend()
void SoundTrack::suspend | ( | ) |
Suspend the output of sound.
Definition at line 84 of file SoundTrack.c.
# unpause()
void SoundTrack::unpause | ( | ) |
Unpause the playback.
Definition at line 79 of file SoundTrack.c.
# update()
bool SoundTrack::update | ( | uint32 | elapsedMicroseconds, |
uint32 | targetPCMUpdates, | ||
fix7_9_ext | tickStep, | ||
fix7_9_ext | targetTimerResolutionFactor, | ||
fixed_t | leftVolumeFactor, | ||
fixed_t | rightVolumeFactor, | ||
int8 | volumeReduction, | ||
uint8 | volumenScalePower, | ||
uint16 | frequencyDelta ) |
Advance the playback on the sound's MIDI tracks.
- Parameters
-
elapsedMicroseconds Elapsed time since the last call targetPCMUpdates Ideal Elapsed time since the last call tickStep Tick step per timer interrupt targetTimerResolutionFactor Factor to apply to the tick step leftVolumeFactor Factor to apply to the left speaker's volume rightVolumeFactor Factor to apply to the right speaker's volume volumeReduction Volume reduction used for fade effects volumenScalePower 2's power to divide to the final volume value frequencyDelta added to the frequency registers
- Returns
- True if the playback is complete; false otherwise
Definition at line 118 of file SoundTrack.c.
# Member Data Documentation
# cursor
|
protected |
Position within the sound track.
Definition at line 268 of file SoundTrack.h.
# cursorSxEV0
|
protected |
SxEV0 cursor.
Definition at line 280 of file SoundTrack.h.
# cursorSxEV1
|
protected |
SxEV1 cursor.
Definition at line 283 of file SoundTrack.h.
# cursorSxFQ
|
protected |
SxFQ cursor.
Definition at line 277 of file SoundTrack.h.
# cursorSxINT
|
protected |
SxINT cursor.
Definition at line 271 of file SoundTrack.h.
# cursorSxLRV
|
protected |
SxLRV cursor.
Definition at line 274 of file SoundTrack.h.
# cursorSxMOD
|
protected |
SxMOD cursor.
Definition at line 292 of file SoundTrack.h.
# cursorSxRAM
|
protected |
SxRAM cursor.
Definition at line 286 of file SoundTrack.h.
# cursorSxSWP
|
protected |
SxSWP cursor.
Definition at line 289 of file SoundTrack.h.
# elapsedTicks
|
protected |
Ticks before moving the cursor.
Definition at line 298 of file SoundTrack.h.
# finished
|
protected |
If true, the playback is complete.
Definition at line 304 of file SoundTrack.h.
# nextElapsedTicksTarget
|
protected |
Next ticks target.
Definition at line 301 of file SoundTrack.h.
# samples
|
protected |
Channel's effective length.
Definition at line 265 of file SoundTrack.h.
# soundTrackSpec
|
protected |
Pointer to the spec that defines how to initialize the soundtrack.
Definition at line 262 of file SoundTrack.h.
# ticks
|
protected |
Total number of ticks.
Definition at line 295 of file SoundTrack.h.
The documentation for this class was generated from the following files:
- VUEngine-Core/source/Sound/SoundTrack/SoundTrack.h
- VUEngine-Core/source/Sound/SoundTrack/SoundTrack.c