![]() |
CUGL 3.0
Cornell University Game Library
|
Classes | |
class | AlgorithmicReverb |
class | AudioDecoder |
class | AudioDevices |
class | AudioEngine |
class | AudioFader |
class | AudioInput |
class | AudioMixer |
class | AudioNode |
class | AudioNodeQueue |
class | AudioOutput |
class | AudioPanner |
class | AudioPlayer |
class | AudioQueue |
class | AudioRedistributor |
class | AudioResampler |
class | AudioSample |
class | AudioScheduler |
class | AudioSpinner |
class | AudioSynchronizer |
class | AudioWaveform |
class | Sound |
class | SoundLoader |
Enumerations | |
enum class | AudioType : int { UNKNOWN = -1 , WAV_FILE = 0 , MP3_FILE = 1 , OGG_FILE = 2 , FLAC_FILE = 3 , IN_MEMORY = 4 } |
Functions | |
AudioType | guessType (const std::string file) |
std::string | typeName (AudioType type) |
The classes supporting sound playback and recording.
While sound is an important part of most games, it is less important in early prototypes. Therefore, we have factored this subsystem out to reduce the application footprint. Note that even without these classes, it is still possible to play audio using the SDL API.
|
strong |
This enum represents the currently supported audio sources.
Currenltly, we only support file types that are easy to stream into a Linear PCM format. We recommend that you use OGG for music (which is streamed) and WAV for sound effects (which is buffered).
All audio sources in CUGL interleave the audio channels. MP3 and WAV ADPCM only support mono or stereo. But all other formats can support more channels. SDL supports up to 8 channels (7.1 stereo) in general. Note that the channel layout for OGG data is nonstandard (e.g. channels > 3 are not stereo compatible), so CUGL standardizes the channel layout to agree with FLAC and other data encodings.
AudioType cugl::audio::guessType | ( | const std::string | file | ) |
Returns the type suggested by the given file name
The type will be determined from the file extension (e.g. .wav, .mp3, .ogg, etc).
file | The file name |
std::string cugl::audio::typeName | ( | AudioType | type | ) |
Returns a string description of the given type
type | The audio source type |