 |
Gorgon Game Engine
|
Go to the documentation of this file.
6 namespace Gorgon {
namespace Audio {
29 { Channel::Mono ,
"Mono" },
30 { Channel::FrontLeft ,
"Front left" },
31 { Channel::FrontRight ,
"Front right" },
32 { Channel::BackLeft ,
"Back left" },
33 { Channel::BackRight ,
"Back right" },
40 std::vector<Channel> channels;
41 switch(channelcount) {
43 return{Channel::Mono};
45 return{Channel::FrontLeft, Channel::FrontRight};
49 return{Channel::FrontLeft, Channel::FrontRight, Channel::BackLeft, Channel::BackRight};
51 return{Channel::FrontLeft, Channel::FrontRight,
Channel::Center, Channel::BackLeft, Channel::BackRight};
std::enable_if< decltype(gorgon__enum_tr_loc(T_()))::isupgradedenum, std::string >::type From(const T_ &e)
Definition: Enum.h:303
std::thread audiothread
Definition: Audio.cpp:29
static Environment Current
Currently active environment.
Definition: Environment.h:128
std::vector< Channel > StandardChannels(int channelcount)
Definition: Basic.h:39
int FindChannel(Channel type) const
Returns the index of the given type of channel. If that channel type does not exists,...
Definition: Audio.h:77
basic_Point3D Normalize() const
Definition: Point3D.h:46
float GetDuration() const
Returns the duration of the audio buffer in seconds. This function will return 0 if data is not set.
Definition: Controllers.cpp:95
int FindChannel(Audio::Channel channel) const
Returns the index of the given channel. If the given channel does not exists, this function returns -...
Definition: Wave.h:442
float Float
Represents floating point data type.
Definition: Types.h:16
int BufferSize
Definition: Audio.cpp:32
std::mutex ControllerMtx
Definition: Controllers.cpp:127
Channel GetChannel(int index) const
Returns the channel type with the given index.
Definition: Audio.h:72
Root namespace for Gorgon Game Engine.
Definition: Any.h:19
Containers::Collection< Controller > Controllers
Definition: Controllers.cpp:126
std::vector< float > volume
Definition: Audio.cpp:35
Eases logging procedure by appending necessary information to the given data and streams to a standar...
Definition: Logging.h:19
void exitfn()
Definition: Audio.cpp:37
Device Current
Definition: Audio.cpp:24
float mastervolume
Definition: Audio.cpp:34
void AudioLoop()
Definition: Audio.cpp:76
DefineEnumStrings(Channel, { Channel::Unknown, "Unknown" }, { Channel::Mono, "Mono" }, { Channel::FrontLeft, "Front left" }, { Channel::FrontRight, "Front right" }, { Channel::BackLeft, "Back left" }, { Channel::BackRight, "Back right" }, { Channel::Center, "Center" }, { Channel::LowFreq, "Bass" },)
float BufferDuration
Definition: Audio.cpp:31
bool IsHeadphones() const
Returns if this device is connected to headphones.
Definition: Audio.h:91
const Containers::Wave * wavedata
Contains the data for this controller.
Definition: Controllers.h:119
void SetVolume(float volume)
Changes the master volume.
Definition: Audio.cpp:44
Represents an audio device.
Definition: Audio.h:36
Basic controller, allows non-positional playback of data buffer.
Definition: Controllers.h:41
int GetSampleRate() const
Returns number of samples per second.
Definition: Audio.h:56
Channel
Names for channels.
Definition: Basic.h:16
bool exiting
Definition: Main.cpp:62
Positional controller allows sounds to be played at a specific location.
Definition: Controllers.h:140
int GetChannelCount() const
Returns the number of channels available.
Definition: Audio.h:67
float GetVolume()
Returns the master volume.
Definition: Audio.cpp:63
Format
Sample format.
Definition: Basic.h:9