nomlib
Loading...
Searching...
No Matches
nom::audio::Sound Class Reference
Inheritance diagram for nom::audio::Sound:
[legend]

Public Member Functions

 Sound (const std::string &name)
nom::uint & buffer ()
 Identifier number for the implementation-defined buffer system.
nom::int16 * data ()
nom::uint64 bitrate () const
nom::real32 frequency () const
 Obtain the audio frequency in Hertz of this sound instance.
int channels () const
 Obtain the number of audio channels of this sound instance.
int total_bytes () const
 Obtain the total number of bytes for this sound instance.
int format () const
 Obtain the audio channel format as expressed in AL_FORMAT_XXX.
nom::real64 duration () const
 Obtain the total length of this sound instance.
nom::int64 sample_count () const
 Obtain the total sample count of this sound instance.
bool streaming () const
virtual bool open (const std::string &filename)
virtual double stream (nom::uint32 buffer, nom::real64 pos)
virtual bool stream__ (nom::uint32 buffer, nom::real64 pos)

Protected Member Functions

void init (const std::string &filename)
void init (nom::int16 *samples, nom::uint32 format, int num_channels)

Protected Attributes

nom::audio::ISoundFileReader * fp_
nom::int16 * samples_
nom::int64 sample_count_
nom::uint buffer_id_
nom::uint64 bitrate_
nom::real32 frequency_
nom::real64 duration_
int total_bytes_
int num_channels_
nom::uint32 format_
bool streaming_

Private Member Functions

void * allocate_samples (nom::size_type bytes, int num_channels, nom::uint32 fmt)
nom::int16 * allocate_samples (nom::size_type bytes, int channels)

Detailed Description

Definition at line 27 of file Sound.hpp.

Member Data Documentation

◆ bitrate_

nom::uint64 nom::audio::Sound::bitrate_
protected

Definition at line 84 of file Sound.hpp.

◆ buffer_id_

nom::uint nom::audio::Sound::buffer_id_
protected

Definition at line 83 of file Sound.hpp.

◆ duration_

nom::real64 nom::audio::Sound::duration_
protected

Definition at line 86 of file Sound.hpp.

◆ format_

nom::uint32 nom::audio::Sound::format_
protected

Definition at line 89 of file Sound.hpp.

◆ fp_

nom::audio::ISoundFileReader* nom::audio::Sound::fp_
protected

Definition at line 80 of file Sound.hpp.

◆ frequency_

nom::real32 nom::audio::Sound::frequency_
protected

Definition at line 85 of file Sound.hpp.

◆ num_channels_

int nom::audio::Sound::num_channels_
protected

Definition at line 88 of file Sound.hpp.

◆ sample_count_

nom::int64 nom::audio::Sound::sample_count_
protected

Definition at line 82 of file Sound.hpp.

◆ samples_

nom::int16* nom::audio::Sound::samples_
protected

Definition at line 81 of file Sound.hpp.

◆ streaming_

bool nom::audio::Sound::streaming_
protected

Definition at line 90 of file Sound.hpp.

◆ total_bytes_

int nom::audio::Sound::total_bytes_
protected

Definition at line 87 of file Sound.hpp.


The documentation for this class was generated from the following file: