Bowls
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Macros Pages
Audio Class Reference

Contains an audio file and the function to play and pause it,. More...

#include <Audio.h>

Collaboration diagram for Audio:
Collaboration graph

Public Member Functions

 Audio (std::string filename, bool loop)
 Creates an audio container that holds a song and audio channel. More...
 
 ~Audio ()
 
void play (bool restart)
 Play the stored audio file. More...
 
void pause ()
 Pause the stored audio file. More...
 

Private Attributes

DWORD chan
 

Detailed Description

Contains an audio file and the function to play and pause it,.

Todo:
Could add a lot more features and control to this at a later date.

Definition at line 11 of file Audio.h.

Constructor & Destructor Documentation

Audio::Audio ( std::string  filename,
bool  loop 
)

Creates an audio container that holds a song and audio channel.

Parameters
std::string- The file path and name of the music file (mp3's tested)
bool- Should the audio continuously loop or only play once. True for loop.
Audio::~Audio ( )

Member Function Documentation

void Audio::pause ( )

Pause the stored audio file.

void Audio::play ( bool  restart)

Play the stored audio file.

Parameters
bool- True to play from the begining, false to resume.

Member Data Documentation

DWORD Audio::chan
private

Definition at line 36 of file Audio.h.


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