29 #ifndef NOMLIB_AL_SOUNDFILE_HEADERS
30 #define NOMLIB_AL_SOUNDFILE_HEADERS
39 #include "nomlib/config.hpp"
40 #include "nomlib/audio/AL/OpenAL.hpp"
66 bool open (
const std::string& filename );
67 bool read ( std::vector<int16>& data );
71 std::shared_ptr<SNDFILE>
fp;
88 #endif // NOMLIB_AL_SOUNDFILE_HEADERS defined
uint32 getChannelCount(void) const
Obtain number of channels used by audio file.
uint32 getChannelFormat(void) const
Obtain channel format; used internally by OpenAL.
uint32 getSampleRate(void) const
Obtain audio sampling rate; this is the number of samples per second.
uint32 channel_count
Number of audio channels used by sound.
uint32 sample_rate
Number of samples per second.
std::shared_ptr< SNDFILE > fp
SNDFILE* file descriptor.
size_t getDataByteSize(void) const
Obtain audio data size in bytes.
size_t getSampleCount(void) const
Obtain number of samples in audio file.
int32 channel_format
OpenAL compatible audio channels used by sound.
std::size_t sample_count
Total number of samples in the file.
std::vector< int16 > samples
Extracted audio stream from file.