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 (void) const
 
Int32 GetBitsPerChannel (void) const
 
Float GetSampleRate (void) const
 
Int32 GetSampleCount (void) const
 
BaseTime GetLength (void) 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 ( void  ) const

Gets the the number of channels.

Returns
The number of channels.

◆ GetBitsPerChannel()

Int32 GetBitsPerChannel ( void  ) const

Gets the number of bits per channel.

Returns
The number of bits per channel.

◆ GetSampleRate()

Float GetSampleRate ( void  ) const

Gets the sample rate.

Returns
The sample rate in Hz.

◆ GetSampleCount()

Int32 GetSampleCount ( void  ) const

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

Returns
The length of the sound in samples.

◆ GetLength()

BaseTime GetLength ( void  ) 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