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 track for encoding. | |
int | lqt_set_audio_codec (quicktime_t *file, int track, lqt_codec_info_t *info) |
Set a codec for an audio track. | |
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.
|
Set up tracks in a new file after opening and before writing.
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. |
|
Encode a number of audio samples for the first track.
|
|
Set up audio tracks for encoding.
|
|
Add an audio track for encoding.
If you passed NULL for the codec_info, you should call lqt_set_audio_codec once you know which codec to use. |
|
Set a codec for an audio track.
|
|
Set the audio language.
|
|
Encode a number of audio samples for the first track.
|
|
Encode audio in the native sampleformat of the codec.
|