#include <C4SoundLoaders.h>
Definition at line 101 of file C4SoundLoaders.h.
◆ ReadInfo()
bool WavLoader::ReadInfo |
( |
SoundInfo * |
result, |
|
|
BYTE * |
data, |
|
|
size_t |
data_length, |
|
|
uint32_t |
|
|
) |
| |
|
overridevirtual |
Implements C4SoundLoaders::SoundLoader.
Definition at line 242 of file C4SoundLoaders.cpp.
246 ALuint wav = alutCreateBufferFromFileImage((
const ALvoid *)data, data_length);
253 ALint freq, chans, bits, size;
254 alGetBufferi(wav, AL_FREQUENCY, &freq);
256 alGetBufferi(wav, AL_CHANNELS, &chans);
257 alGetBufferi(wav, AL_BITS, &bits);
258 alGetBufferi(wav, AL_SIZE, &size);
261 result->
format = AL_FORMAT_MONO8;
263 result->
format = AL_FORMAT_MONO16;
266 result->
format = AL_FORMAT_STEREO8;
268 result->
format = AL_FORMAT_STEREO16;
271 result->
sample_length = double(size) / double(bits*chans*freq/8);
C4Application Application
C4MusicSystem MusicSystem
C4SoundHandle final_handle
References Application, C4SoundLoaders::SoundInfo::final_handle, C4SoundLoaders::SoundInfo::format, C4Application::MusicSystem, C4SoundLoaders::SoundInfo::sample_length, C4SoundLoaders::SoundInfo::sample_rate, and C4MusicSystem::SelectContext().
◆ first_loader
◆ next
◆ OPTION_Raw
const int C4SoundLoaders::SoundLoader::OPTION_Raw = 1 |
|
staticinherited |
◆ singleton
The documentation for this class was generated from the following files: