class Audio

Audio class

Public Methods

Audio ()
Constructor. Set initial variable values.
int get_num_channels (void)
Return the number of channels.
int get_SR (void)
Return the sample rate.
void init_afile (void)
Set sample rate and number of channels.
void init_audio (void)
Connect to audio server. Create sample actor for sound playback.
void jump_song (float spot)
Jump to the current "time" in the sound sample
void kill_audio (void)
Kill the sound server and delete the sample actor.
double play_audio (void)
Start the sound sample playing and send a message that the simulation has begun

Private Fields

int afile_num_channels
int afile_SR
float aSampleActor
int audio_connected
char* name
char* path
const double PLAY_LATENCY_ESTIMATE
Lag time between sound trigger and sound start
float sound

Documentation

Audio class. The audio class will take care of playing the main audio file as is specified in the *.m4c file. The file is loaded and the VSS (currently 2.3) soundserver is started. This class will also take care of syncronizing the audio and the visual portions of the program by jumping to the current place in the sound sample.
Audio()
Constructor. Set initial variable values.

void init_audio(void)
Connect to audio server. Create sample actor for sound playback.

void init_afile(void)
Set sample rate and number of channels.

double play_audio(void)
Start the sound sample playing and send a message that the simulation has begun

void jump_song(float spot)
Jump to the current "time" in the sound sample. Function is called every few frames to keep the audio and video synchronized.
Parameters:
spot - The time in seconds since the graphics have begun. Sound will jump "spot" seconds into the audio file. *

void kill_audio(void)
Kill the sound server and delete the sample actor.

int get_SR(void)
Return the sample rate.

int get_num_channels(void)
Return the number of channels.

const double PLAY_LATENCY_ESTIMATE
Lag time between sound trigger and sound start

int afile_SR

int afile_num_channels

float aSampleActor

float sound

int audio_connected

char* path

char* name


This class has no child classes.

alphabetic index hierarchy of classes


M4cave Sound Visualization

Contacts

M4cave Reference Manual
Help With Doc++

generated by doc++