GeSndInfo Class Reference

#include <lib_snd.h>

Detailed Description

A class that describes a sound.

See also
BaseSound::GetSoundInfo

Public Member Functions

 GeSndInfo ()
 
 GeSndInfo (BaseSound *bs)
 
Int32 GetChannelCount () const
 
Int32 GetBitsPerChannel () const
 
Float GetSampleRate () const
 
Int32 GetSampleCount () const
 
BaseTime GetLength () const
 

Private Attributes

Int32 channel_cnt
 
Int32 bits_per_channel
 
Float sample_rate
 
Int32 sample_cnt
 
Chardata
 

Constructor & Destructor Documentation

◆ GeSndInfo() [1/2]

GeSndInfo ( )

Default constructor.

◆ GeSndInfo() [2/2]

GeSndInfo ( BaseSound bs)
explicit

Constructs with a BaseSound.

Parameters
[in]bsThe sound to initialize from.

Member Function Documentation

◆ GetChannelCount()

Int32 GetChannelCount ( ) const

Gets the the number of channels.

Returns
The number of channels.

◆ GetBitsPerChannel()

Int32 GetBitsPerChannel ( ) const

Gets the number of bits per channel.

Returns
The number of bits per channel.

◆ GetSampleRate()

Float GetSampleRate ( ) const

Gets the sample rate.

Returns
The sample rate in Hz.

◆ GetSampleCount()

Int32 GetSampleCount ( ) const

Gets the the duration/length of the sound in samples.

Returns
The length of the sound in samples.

◆ GetLength()

BaseTime GetLength ( ) const

Gets the length of the sound as BaseTime.

Returns
The length of the sound.

Member Data Documentation

◆ channel_cnt

Int32 channel_cnt
private

◆ bits_per_channel

Int32 bits_per_channel
private

◆ sample_rate

Float sample_rate
private

◆ sample_cnt

Int32 sample_cnt
private

◆ data

Char* data
private