|
YourGameLib
|
#include <string>#include <map>#include <cmath>#include <cstdint>#include <vector>#include <valarray>#include "yourgame/file.h"#include "yourgame/log.h"#include "stb_vorbis.c"#include "miniaudio.h"
Namespaces | |
| namespace | yourgame |
| namespace | yourgame::audio |
| audio playback related functions | |
Macros | |
| #define | STB_VORBIS_HEADER_ONLY |
Functions | |
| int | yourgame::audio::init (int numSources, int numChannels=0, int sampleRate=0) |
| initialize audio | |
| void | yourgame::audio::shutdown () |
| shutdown audio | |
| bool | yourgame::audio::isInitialized () |
| check if audio initialized | |
| int | yourgame::audio::storeFile (const std::string &filename) |
| load and store audio file | |
| int | yourgame::audio::play (const std::string &filename, bool loop=false) |
| play audio file, that was previously loaded via storeFile() | |
| int | yourgame::audio::stop (int sourceId) |
| stop audio source | |
| int | yourgame::audio::pause (int sourceId, bool pause) |
| pause/unpause audio source | |
| int | yourgame::audio::setChannelGains (int sourceId, const std::vector< float > &gains) |
| set gain per channel of an audio source | |
| #define STB_VORBIS_HEADER_ONLY |
| std::vector<float> channelGains |
| ma_decoder decoder |
| bool loop = false |
| bool paused = false |