Functions | |
| int | quicktime_set_audio (quicktime_t *file, int channels, long sample_rate, int bits, char *compressor) |
| Set up tracks in a new file after opening and before writing. | |
| int | quicktime_encode_audio (quicktime_t *file, int16_t **input_i, float **input_f, long samples) |
| Encode a number of audio samples for the first track. | |
| int | lqt_set_audio (quicktime_t *file, int channels, long sample_rate, int bits, lqt_codec_info_t *codec_info) |
| Set up audio tracks for encoding. | |
| int | lqt_add_audio_track (quicktime_t *file, int channels, long sample_rate, int bits, lqt_codec_info_t *codec_info) |
| Add an audio tracks for encoding. | |
| void | lqt_set_audio_language (quicktime_t *file, int track, const char *language) |
| Set the audio language. | |
| int | lqt_encode_audio_track (quicktime_t *file, int16_t **output_i, float **output_f, long samples, int track) |
| Encode a number of audio samples for the first track. | |
| int | lqt_encode_audio_raw (quicktime_t *file, void *input, long samples, int track) |
| Encode audio in the native sampleformat of the codec. | |
The audio API changed a lot during the last years (causing lot of confusion), so here is the preferred way: Use the Codec registry functions to get all supported audio encoders. Once you found a codec (i.e. a lqt_codec_info_t ), call lqt_add_audio_track to add the track to the file. You can repeat this procedure to add as many tracks as you like with different formats and/or codecs.
Next you might want to set some compression parameters. This is done by calling lqt_set_audio_parameter. Supported parameters and valid ranges are in the lqt_codec_info_t.
For each track, encode noninterleaved samples (either in 16bit integer or floating point [-1.0..1.0] format) with lqt_encode_audio_track . In this case, libquicktime will convert your samples to the format used by the codec. This won't give the full precision when using 24/32 bit formats. If you want to pass the samples as raw as possible (bypassing all internal sample format conversions), use lqt_get_sample_format to get the sampleformat natively used by the codec and lqt_encode_audio_raw to encode it.
| int quicktime_set_audio | ( | quicktime_t * | file, | |
| int | channels, | |||
| long | sample_rate, | |||
| int | bits, | |||
| char * | compressor | |||
| ) |
Set up tracks in a new file after opening and before writing.
| file | A quicktime handle | |
| channels | Number of channels | |
| sample_rate | Samplerate | |
| bits | Bits per sample | |
| compressor | Compressor to use |
This function is depracated and should not be used in newly written code. It won't let you add individual tracks with different codecs, samplerates etc. Use lqt_add_audio_track instread.
| int quicktime_encode_audio | ( | quicktime_t * | file, | |
| int16_t ** | input_i, | |||
| float ** | input_f, | |||
| long | samples | |||
| ) |
Encode a number of audio samples for the first track.
| file | A quicktime handle | |
| input_i | 16 bit integer output buffer (or NULL) | |
| input_f | floating point output buffer (or NULL) | |
| samples | Number of samples to decode |
| int lqt_set_audio | ( | quicktime_t * | file, | |
| int | channels, | |||
| long | sample_rate, | |||
| int | bits, | |||
| lqt_codec_info_t * | codec_info | |||
| ) |
Set up audio tracks for encoding.
| file | A quicktime handle | |
| channels | Number of channels | |
| sample_rate | Samplerate | |
| bits | Bits per sample (always 16) | |
| codec_info | Codec to use (see Codec registry ) |
| int lqt_add_audio_track | ( | quicktime_t * | file, | |
| int | channels, | |||
| long | sample_rate, | |||
| int | bits, | |||
| lqt_codec_info_t * | codec_info | |||
| ) |
Add an audio tracks for encoding.
| file | A quicktime handle | |
| channels | Number of channels | |
| sample_rate | Samplerate | |
| bits | Bits per sample (always 16) | |
| codec_info | Codec to use (see Codec registry ) |
| void lqt_set_audio_language | ( | quicktime_t * | file, | |
| int | track, | |||
| const char * | language | |||
| ) |
Set the audio language.
| file | A quicktime handle | |
| track | Track index (starting with 0) | |
| language | ISO-639 Language code |
| int lqt_encode_audio_track | ( | quicktime_t * | file, | |
| int16_t ** | output_i, | |||
| float ** | output_f, | |||
| long | samples, | |||
| int | track | |||
| ) |
Encode a number of audio samples for the first track.
| file | A quicktime handle | |
| output_i | 16 bit integer output buffer (or NULL) | |
| output_f | floating point output buffer (or NULL) | |
| samples | Number of samples to decode | |
| track | index (starting with 0) |
| int lqt_encode_audio_raw | ( | quicktime_t * | file, | |
| void * | input, | |||
| long | samples, | |||
| int | track | |||
| ) |
Encode audio in the native sampleformat of the codec.
| file | A quicktime handle | |
| input | An array of interleaved samples | |
| samples | Number of samples to encode | |
| track | Track index (starting with 0) |
1.5.4