#include <OpenAL.h>
Public Member Functions | |
OpenAL () | |
~OpenAL () | |
bool | init (void) |
void | uninit () |
::pBuffer | createBuffer (const wchar *file, FILEFORMAT format) |
::pSound | createSound (::pBuffer buffer, bool dynamic, float3 *position, float3 *velocity, float3 *direction, float distance, float coneAngle, bool loop, float volume) |
::pMusic | createMusic (const wchar *file, bool loop, float volume, FILEFORMAT format) |
void | free (::pBuffer &buffer) |
void | free (::pSound &sound) |
void | free (::pMusic &musik) |
void | listener (float3 position, float3 velocity, float3 direction) |
void | options (float doppler, float speedofsound) |
void | update (void) |
bool | supports (FILEFORMAT fileformat, bool forSound=true) |
Definition at line 26 of file OpenAL.h.
STARTNAMESPACE OpenAL::OpenAL | ( | ) |
Definition at line 5 of file OpenAL.cpp.
OpenAL::~OpenAL | ( | ) |
Definition at line 17 of file OpenAL.cpp.
pBuffer OpenAL::createBuffer | ( | const wchar * | file, | |
FILEFORMAT | format | |||
) | [virtual] |
================================================== Create a sound buffer. -------------------------------------------------- ==================================================
Implements IAudio.
Definition at line 93 of file OpenAL.cpp.
pMusic OpenAL::createMusic | ( | const wchar * | file, | |
bool | loop, | |||
float | volume, | |||
FILEFORMAT | format | |||
) | [virtual] |
================================================== Create music from a file. -------------------------------------------------- Music musst be created from a file, because music is streamed. ==================================================
Implements IAudio.
Definition at line 176 of file OpenAL.cpp.
pSound OpenAL::createSound | ( | ::pBuffer | buffer, | |
bool | dynamic, | |||
float3 * | position, | |||
float3 * | velocity, | |||
float3 * | direction, | |||
float | distance, | |||
float | coneAngle, | |||
bool | loop, | |||
float | volume | |||
) |
Definition at line 138 of file OpenAL.cpp.
void OpenAL::free | ( | ::pMusic & | musik | ) |
Definition at line 240 of file OpenAL.cpp.
void OpenAL::free | ( | ::pBuffer & | buffer | ) |
Definition at line 228 of file OpenAL.cpp.
void OpenAL::free | ( | ::pSound & | sound | ) |
Definition at line 232 of file OpenAL.cpp.
bool OpenAL::init | ( | void | ) | [virtual] |
================================================== Initialize the class. -------------------------------------------------- Initialize the audio class. ==================================================
Implements IAudio.
Definition at line 42 of file OpenAL.cpp.
================================================== Listener options. -------------------------------------------------- ==================================================
Implements IAudio.
Definition at line 247 of file OpenAL.cpp.
void OpenAL::options | ( | float | doppler, | |
float | speedofsound | |||
) | [virtual] |
================================================== Other options. -------------------------------------------------- ==================================================
Implements IAudio.
Definition at line 256 of file OpenAL.cpp.
bool OpenAL::supports | ( | FILEFORMAT | fileformat, | |
bool | forSound = true | |||
) | [virtual] |
================================================== Check if file format is supported -------------------------------------------------- If 'forSound' is set true, check if file format is supported for sounds. If false, check if file format is supported for music. ==================================================
Implements IAudio.
Definition at line 286 of file OpenAL.cpp.
void OpenAL::uninit | ( | ) | [virtual] |
================================================== Uninitialize the interface. -------------------------------------------------- After calling uninit(), the class musst be reinitialized to use its methods. ==================================================
Implements IAudio.
Definition at line 76 of file OpenAL.cpp.
void OpenAL::update | ( | void | ) | [virtual] |
================================================== Update the audio class. -------------------------------------------------- Sould be done in each frame of the application. ==================================================
Implements IAudio.
Definition at line 261 of file OpenAL.cpp.