Main Page | Data Structures | File List | Data Fields | Globals | Related Pages

KEqualization.h File Reference

Structures and functions for Equalization and mastering... More...

#include "ktypes.h"
#include "KXml.h"

Defines

#define IKX_DFLAG_EQUAL   "EQUAL"
 Flags used for the import/export of equalization structures under XML format.
#define IKX_DFLAG_EQUAL_NB_FREQ   "NBFREQ"
 Flags used for the import/export of equalization structures under XML format.
#define IKX_DFLAG_EQUAL_INTERPOLATION   "INTERPOL"
 Flags used for the import/export of equalization structures under XML format.
#define IKX_DFLAG_EQUAL_FREQ   "FREQ"
 Flags used for the import/export of equalization structures under XML format.
#define IKX_DFLAG_EQUAL_AMPL   "AMPL"
 Flags used for the import/export of equalization structures under XML format.
#define KEqual_setAmplAt(kEqual, a, i)   KEqual_setAmplitudeAt(kEqual, KEqual_getFreqAt (kEqual, i), a, i)
 Adds or modifies an amplitude.

Typedefs

typedef _KEqualization KEqual
 Equalization structure.

Functions

KTL_API KEqualKEqual_new ()
 Creates an equalization structure.
KTL_API void KEqual_delete (KEqual **object)
 Deletes an equalization structure.
KTL_API void KEqual_init (KEqual *object)
 Initializes an equalization structure.
KTL_API KBool KEqual_check (KEqual *object)
 Verifies the efficiency of the equalization structure.
KTL_API KBool KEqual_isEqual (KEqual *pEqual1, KEqual *pEqual2)
 Checks if the two equalization structures are equal.
KTL_API KDouble KEqual_getAmplAt (KEqual *kEqual, KInt idx)
 Gets the amplitude that corresponds to a particular index.
KTL_API KXmlKEqual_exportToXml (KEqual *kEqual)
 Exports an equalization structure under an XML format.
KTL_API KEqualKEqual_extractFromXml (KXml *xo)
 Initializes an equalization structure from an XML structure.
KTL_API KEqualKEqual_clone (KEqual *kEqual)
 Clones an equalization structure.
KTL_API KEqualKEqual_copy (KEqual *dst, KEqual *src)
 Copies an equalization structure in another allocated equalization structure.
KTL_API void KEqual_print (KEqual *kequal)
 Prints an equalization structure on the standard output.
KTL_API KEqualKEqual_initAmplitudes (KDouble *freq, KDouble *amp, KInt n)
 Creates an equalization structure.
KTL_API KBool KEqual_setAmplitude (KEqual *kEqual, KDouble freq, KDouble ampl)
 Modifies or adds an amplitude for a given frequency in an equalization structure.
KTL_API KBool KEqual_setAmplitudeAt (KEqual *kEqual, KDouble freq, KDouble ampl, KInt32 idx)
 Adds or modifies an amplitude.
KTL_API KBool KEqual_eraseFreq (KEqual *kEqual, KDouble freq)
 Deletes the amplitude corresponding to a frequency.
KTL_API KBool KEqual_removeAmplAt (KEqual *kEqual, KInt idx)
 Deletes both amplitude and frequency correponding to the given index.
KTL_API KInt KEqual_getNbFreq (KEqual *kEqual)
 Gets the frequency number.
KTL_API KDouble KEqual_getFreqAt (KEqual *kEqual, KInt idx)
 Obtains the frequency corresponding to a given index.
KTL_API KDouble KEqual_getAmplitude (KEqual *kEqual, KDouble freq)
 Obtains the amplitude corresponding to the given frequency.
KTL_API KEqualKEqual_getTotalEqual (KEqual *kEqual, KDouble minFreq, KDouble maxFreq, KInt nValues)
 Gets several amplitudes corresponding to several frequencies.


Detailed Description

Structures and functions for Equalization and mastering...

Version:
KToolLib-1.0
Author:
Fabien Gallot
Date:
02/09/2008
Note:
Copyright © 2008-2010 iKlax Media SAS (www.iklaxmedia.com). All rights reserved.

Define Documentation

#define KEqual_setAmplAt kEqual,
a,
 )     KEqual_setAmplitudeAt(kEqual, KEqual_getFreqAt (kEqual, i), a, i)
 

Adds or modifies an amplitude.

Adds or modifies the amplitude that corresponds to the frequency where index is given as a parameter. If the index is greater than the number of frequency then the couple frequency amplitude is added to the structure

Parameters:
kEqual the pointer to the equalization structure to be modified
a the amplitude to be added
i the index of the frequency
Returns:
ktrue if successful otherwise kfalse


Function Documentation

KTL_API KBool KEqual_check KEqual object  ) 
 

Verifies the efficiency of the equalization structure.

Parameters:
object the pointer to the equalization structure to be checked
Returns:
ktrue if the structure is efficient otherwise kfalse

KTL_API KEqual* KEqual_clone KEqual kEqual  ) 
 

Clones an equalization structure.

Parameters:
kEqual the pointer to the equalization structure to be cloned
Returns:
the pointer to the cloned equalization structure otherwise knull

KTL_API KEqual* KEqual_copy KEqual dst,
KEqual src
 

Copies an equalization structure in another allocated equalization structure.

Parameters:
dst the pointer to the equalization structure where an equalization structure should be copied
src the pointer to the source equalization structure
Returns:
the pointer to the equalization structure to be copied

KTL_API void KEqual_delete KEqual **  object  ) 
 

Deletes an equalization structure.

Parameters:
object the pointers to the equalization structure

KTL_API KBool KEqual_eraseFreq KEqual kEqual,
KDouble  freq
 

Deletes the amplitude corresponding to a frequency.

Parameters:
kEqual the pointer to the equalization structure
freq the frequency to be deleted
Returns:
ktrue if successful otherwise kfalse

KTL_API KXml* KEqual_exportToXml KEqual kEqual  ) 
 

Exports an equalization structure under an XML format.

Parameters:
kEqual the pointer to the equalization structure to be exported
Returns:
the pointer to the exported XML structure corresponding to the given equalization structure if successful otherwise knull

KTL_API KEqual* KEqual_extractFromXml KXml xo  ) 
 

Initializes an equalization structure from an XML structure.

Parameters:
xo the pointer to the XML structure to be converted
Returns:
the pointer to the converted equalization structure if successful otherwise knull

KTL_API KDouble KEqual_getAmplAt KEqual kEqual,
KInt  idx
 

Gets the amplitude that corresponds to a particular index.

Parameters:
kEqual the pointer to the equalization structure
idx the index of the amplitude to be returned
Returns:
a floating point number that represents the amplitude of the specified index in the equalization structure

KTL_API KDouble KEqual_getAmplitude KEqual kEqual,
KDouble  freq
 

Obtains the amplitude corresponding to the given frequency.

If necessary, an interpolation is computed in order to find the correcg amplitude

Parameters:
kEqual the pointer to the equalization structure
freq the frequency corresponding to the amplitude to be returned
Returns:
the amplitude corresponding to the given frequency if successful otherwise 0.0

KTL_API KDouble KEqual_getFreqAt KEqual kEqual,
KInt  idx
 

Obtains the frequency corresponding to a given index.

Parameters:
kEqual the pointer to the equalization structure
idx the index corresponding to the frequency to be returned
Returns:
the frequency corresponding to the given index if successful otherwise -1

KTL_API KInt KEqual_getNbFreq KEqual kEqual  ) 
 

Gets the frequency number.

Parameters:
kEqual the pointer to the equalization structure
Returns:
the frequency number

KTL_API KEqual* KEqual_getTotalEqual KEqual kEqual,
KDouble  minFreq,
KDouble  maxFreq,
KInt  nValues
 

Gets several amplitudes corresponding to several frequencies.

The function computes and returns amplitudes from a number of given frequencies defined by a minimum frequency and a maximum one

Parameters:
kEqual the pointer to the equalization structure
minFreq the minimum frequency
maxFreq the maximum frequency
nValues the number of frequencies
Returns:
the pointer to the equalization structure that contains the resulting amplitudes and frequencies

KTL_API void KEqual_init KEqual object  ) 
 

Initializes an equalization structure.

Parameters:
object the pointer to the equalization structure to be initialized

KTL_API KEqual* KEqual_initAmplitudes KDouble freq,
KDouble amp,
KInt  n
 

Creates an equalization structure.

Parameters:
freq the pointer to the frequencies
amp the pointer to the amplitudes corresponding to the frequencies
n the number of values of both frequencies and amplitudes
Returns:
the pointer to the created equalization structure if successful otherwise knull

KTL_API KBool KEqual_isEqual KEqual pEqual1,
KEqual pEqual2
 

Checks if the two equalization structures are equal.

Parameters:
pEqual1 the pointer to the first equalization structures to be compared
pEqual2 the pointer to the seconde equalization structures to be compared
Returns:
ktrue if the two structures are equal otherwise kfalse

KTL_API KEqual* KEqual_new  ) 
 

Creates an equalization structure.

Returns:
the pointer to the KEqual structure

KTL_API void KEqual_print KEqual kequal  ) 
 

Prints an equalization structure on the standard output.

Parameters:
kequal the pointer to the equalization structure to be printed

KTL_API KBool KEqual_removeAmplAt KEqual kEqual,
KInt  idx
 

Deletes both amplitude and frequency correponding to the given index.

Parameters:
kEqual the pointer to the equalization structure
idx the index of the couple frequency amplitude to be deleted
Returns:
ktrue if successful otherwise kfalse

KTL_API KBool KEqual_setAmplitude KEqual kEqual,
KDouble  freq,
KDouble  ampl
 

Modifies or adds an amplitude for a given frequency in an equalization structure.

If the frequency does not exist, it is added to the structure...

Parameters:
kEqual the pointer to the equalization structure to be modified
freq the frequency where amplitude should be modified or added
ampl the corresponding amplitude
Returns:
ktrue if successful otherwise kfalse

KTL_API KBool KEqual_setAmplitudeAt KEqual kEqual,
KDouble  freq,
KDouble  ampl,
KInt32  idx
 

Adds or modifies an amplitude.

Adds or modifies the amplitude that corresponds to the frequency where index is given as a parameter. If the index is greater than the number of frequency then the couple frequency amplitude is added to the structure

Parameters:
kEqual the pointer to the equalization structure to be modified
freq the frequency where corresponding to the amplitude to be modified
ampl the amplitude to be added
idx the index of the frequency
Returns:
ktrue if successful otherwise kfalse


Generated on Tue Mar 9 10:49:29 2010 for iKlax Tools Library (KToolLib) by doxygen 1.3.8