kradio4  r778
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Public Member Functions | Public Attributes | List of all members
SoundFormat Struct Reference

#include <soundformat.h>

Public Member Functions

 SoundFormat (unsigned sample_rate, unsigned channels, unsigned sample_bits, bool is_signed, unsigned endianess, const QString &enc)
 
 SoundFormat (unsigned sample_rate, unsigned channels, unsigned sample_bits, bool is_signed, unsigned endianess)
 
 SoundFormat (unsigned sample_rate, unsigned channels, unsigned sample_bits, bool is_signed)
 
 SoundFormat (bool stereo)
 
 SoundFormat ()
 
bool operator== (const SoundFormat &o) const
 
bool operator!= (const SoundFormat &o) const
 
int sampleSize () const
 
int frameSize () const
 
int minValue () const
 
int maxValue () const
 
void restoreConfig (const QString &prefix, const KConfigGroup &c)
 
void saveConfig (const QString &prefix, KConfigGroup &c) const
 
void convertSamplesToFloatInterleaved (const char *src, float *dst, size_t n_frames) const
 
void convertFloatInterleavedToSamples (const float *src, char *dst, size_t n_frames) const
 
void convertSamplesToFloatNonInterleaved (const char *src, float **dst, size_t n_frames) const
 
void convertFloatNonInterleavedToSamples (const float **src, char *dst, size_t n_frames) const
 
void scaleSamples (char *_src, float scale, size_t n_frames) const
 
void minMaxAvgMagnitudePerChannel (const char *src, size_t n_frames, double *vmin, double *vmax, double *vavg) const
 
bool isValid () const
 

Public Attributes

unsigned m_SampleRate
 
unsigned m_Channels
 
unsigned m_SampleBits
 
bool m_IsSigned
 
unsigned m_Endianess
 
QString m_Encoding
 

Detailed Description

Definition at line 31 of file soundformat.h.

Constructor & Destructor Documentation

SoundFormat::SoundFormat ( unsigned  sample_rate,
unsigned  channels,
unsigned  sample_bits,
bool  is_signed,
unsigned  endianess,
const QString &  enc 
)
inline

Definition at line 39 of file soundformat.h.

SoundFormat::SoundFormat ( unsigned  sample_rate,
unsigned  channels,
unsigned  sample_bits,
bool  is_signed,
unsigned  endianess 
)
inline

Definition at line 41 of file soundformat.h.

SoundFormat::SoundFormat ( unsigned  sample_rate,
unsigned  channels,
unsigned  sample_bits,
bool  is_signed 
)
inline

Definition at line 43 of file soundformat.h.

SoundFormat::SoundFormat ( bool  stereo)
inline

Definition at line 45 of file soundformat.h.

SoundFormat::SoundFormat ( )
inline

Definition at line 47 of file soundformat.h.

Member Function Documentation

void SoundFormat::convertFloatInterleavedToSamples ( const float *  src,
char *  dst,
size_t  n_frames 
) const
void SoundFormat::convertFloatNonInterleavedToSamples ( const float **  src,
char *  dst,
size_t  n_frames 
) const
void SoundFormat::convertSamplesToFloatInterleaved ( const char *  src,
float *  dst,
size_t  n_frames 
) const
void SoundFormat::convertSamplesToFloatNonInterleaved ( const char *  src,
float **  dst,
size_t  n_frames 
) const
int SoundFormat::frameSize ( ) const
bool SoundFormat::isValid ( ) const
inline

Definition at line 76 of file soundformat.h.

int SoundFormat::maxValue ( ) const
void SoundFormat::minMaxAvgMagnitudePerChannel ( const char *  src,
size_t  n_frames,
double *  vmin,
double *  vmax,
double *  vavg 
) const
int SoundFormat::minValue ( ) const
bool SoundFormat::operator!= ( const SoundFormat o) const
inline

Definition at line 58 of file soundformat.h.

bool SoundFormat::operator== ( const SoundFormat o) const
inline

Definition at line 50 of file soundformat.h.

References m_Channels, m_Encoding, m_Endianess, m_IsSigned, m_SampleBits, and m_SampleRate.

void SoundFormat::restoreConfig ( const QString &  prefix,
const KConfigGroup &  c 
)
int SoundFormat::sampleSize ( ) const
void SoundFormat::saveConfig ( const QString &  prefix,
KConfigGroup &  c 
) const
void SoundFormat::scaleSamples ( char *  _src,
float  scale,
size_t  n_frames 
) const

Member Data Documentation

unsigned SoundFormat::m_Channels

Definition at line 33 of file soundformat.h.

Referenced by operator==().

QString SoundFormat::m_Encoding

Definition at line 37 of file soundformat.h.

Referenced by operator==().

unsigned SoundFormat::m_Endianess

Definition at line 36 of file soundformat.h.

Referenced by operator==().

bool SoundFormat::m_IsSigned

Definition at line 35 of file soundformat.h.

Referenced by operator==().

unsigned SoundFormat::m_SampleBits

Definition at line 34 of file soundformat.h.

Referenced by operator==().

unsigned SoundFormat::m_SampleRate

Definition at line 32 of file soundformat.h.

Referenced by operator==().


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