Go to the source code of this file.
|
Number of samples per frame of Layer 2 MPEG Audio |
|
Opaque data type for the twolame encoder options. |
|
MPEG modes |
|
MPEG Version. MPEG2 is for Lower Sampling Frequencies - LSF < 32000. |
|
Padding types. |
|
Emphasis types. |
|
Get the version number of the TwoLAME library. eg "0.3.1".
|
|
Get the URL of the TwoLAME homepage. eg "http://www.twolame.org/".
|
|
Print the library version and encoder parameter settings to STDERR. Will display differnent ammounts of information depending on the verbosity setting. If verbosity is set to 0 then no message will be displayed.
|
|
Initialise the twolame encoder. Sets defaults for all parameters. Will return NULL if malloc() failed, otherwise returns a pointer which you then need to pass to all future API calls.
|
|
Prepare to start encoding. You must call twolame_init_params() before you start encoding. It will check call your parameters to make sure they are valid, as well as allocating buffers and initising internally used variables.
|
|
Encode some 16-bit PCM audio to MP2. Takes 16-bit PCM audio samples from seperate left and right buffers and places encoded audio into mp2buffer.
|
|
Encode some 16-bit PCM audio to MP2. Takes interleaved 16-bit PCM audio samples from a single buffer and places encoded audio into mp2buffer.
|
|
Encode some 32-bit PCM audio to MP2. Takes 32-bit floating point PCM audio samples from seperate left and right buffers and places encoded audio into mp2buffer. Note: the 32-bit samples are currently scaled down to 16-bit samples internally.
|
|
Encode any remains buffered PCM audio to MP2. Encodes any remaining audio samples in the libtwolame internal sample buffer. This function will return at most a single frame of MPEG Audio, and at least 0 frames.
|
|
Shut down the twolame encoder. Shuts down the twolame encoder and frees all memory that it previously allocated. You should call this once you have finished all your encoding. This function will set your glopts pointer to NULL for you.
|
|
Set the verbosity of the encoder. Sets how verbose the encoder is with the debug and informational messages it displays. The higher the number, the more messages it will display. Set to 0 for no status messages to STDERR ( error messages will still be displayed ). Default: 1
|
|
Get the verbosity of the encoder.
|
|
Set the MPEG Audio Mode (Mono, Stereo, etc) for the output stream. Default: TWOLAME_AUTO_MODE
|
|
Get the MPEG Audio mode of the output stream.
|
|
Get a string name for the current MPEG Audio mode.
|
|
Set the MPEG version of the MPEG audio stream. Default: TWOLAME_MPEG1
|
|
Get the MPEG version of the output stream.
|
|
Get a string name for the current MPEG version.
|
|
Get the number of bytes per MPEG audio frame, for current settings.
|
|
Set the Psychoacoustic Model used to encode the audio. Default: 3
|
|
Get the Psychoacoustic Model used to encode the audio.
|
|
Set the number of channels in the input stream. If this is different the number of channels in the output stream (set by mode) then the encoder will automatically downmix/upmix the audio. Default: 2
|
|
Get the number of channels in the input stream.
|
|
Set the scaling level for audio before encoding. Set to 0 to disable. Default: 0
|
|
Get the scaling level for audio before encoding.
|
|
Set the scaling level for left channel audio before encoding. Set to 0 to disable. Default: 0
|
|
Get the scaling level for audio left channel before encoding.
|
|
Set the scaling level for right channel audio before encoding. Set to 0 to disable. Default: 0
|
|
Get the scaling level for audio right channel before encoding.
|
|
Set the samplerate of the PCM audio input. Default: 44100
|
|
Get the samplerate of the PCM audio input.
|
|
Set the samplerate of the MPEG audio output. Default: 44100
|
|
Get the samplerate of the MPEG audio output.
|
|
Set the bitrate of the MPEG audio output stream. Default: 192
|
|
Get the bitrate of the MPEG audio output.
|
|
Set the bitrate of the MPEG audio output stream (LAME style). same as twolame_set_bitrate() |
|
Get the bitrate of the MPEG audio output stream (LAME style). same as twolame_get_bitrate() |
|
Set frame padding for the MPEG audio output stream. i.e. adjust frame sizes to achieve overall target bitrate Default: TWOLAME_PAD_NO
|
|
Get the padding type of the MPEG audio output.
|
|
Enable/Disable Energy Level Extension. Enable writing the peak PCM level (energy level) at the end of each MPEG audio frame (in the ancillary bits). This function will automatically call twolame_set_num_ancillary_bits() to set the required number of ancillary bits for this feature. The energy level extension is commonly used in the broadcast industry for visualising the audio in editing applications without decoding. Default: FALSE
|
|
Get the Energy Level Extension state.
|
|
Set number of Ancillary Bits at end of frame. Default: 0
|
|
Get the number of Ancillary Bits at end of frame.
|
|
Set the type of pre-emphasis to be applied to the decoded audio. Default: TWOLAME_EMPHASIS_N
|
|
Get the type of pre-emphasis to be applied to the decoded audio.
|
|
Enable/Disable CRC Error Protection. Default: FALSE
|
|
Get the CRC Error Protection state.
|
|
Set the MPEG Audio Copyright flag. Indicates that MPEG stream is copyrighted. Default: FALSE
|
|
Get the copright flag state
|
|
Set the MPEG Audio Original flag. Default: FALSE
|
|
Get the origianl flag state.
|
|
Enable/Disable VBR (Variable Bit Rate) mode. Default: FALSE
|
|
Get the VBR state.
|
|
Set the level/quality of the VBR audio. The level value can is a measurement of quality - the higher the level the higher the average bitrate of the resultant file. Default: 5.0
|
|
Get the level/quality of the VBR audio.
|
|
Set the adjustment (in dB) applied to the ATH for Psycho models 3 and 4. Default: 0.0
|
|
Get the adjustment (in dB) applied to the ATH for Psycho models 3 and 4.
|
|
Set the upper bitrate for VBR Default: 0 (off)
|
|
Get the upper bitrate for VBR.
|
|
Enable/Disable the quick mode for psycho model calculation. Default: FALSE
|
|
Get the state of quick mode.
|
|
Set how often the psy model is calculated. Default: 10
|
|
Get the how often the psy model is calculated.
|
|
Enable/Disable the Eureka 147 DAB extensions for MP2. Default: FALSE
|
|
Get the state of the DAB extensions
|
|
Set the number of bytes to reserve for DAB XPAD data. Default: 0
|
|
Get the number of bytes reserved for DAB XPAD data.
|
|
Set the CRC error protection length for DAB. Default: 2
|
|
Get the CRC error protection length for DAB.
|