Specifies what transformations to apply to the audio during the decoding process.
The default value for this struct will tell Babycat to decode audio as-is and not change anything.
We discard any audio before this millisecond offset. By default, this does nothing and the audio is decoded from the beginning. Negative offsets are invalid.
We discard any audio after this millisecond offset. By default, this does nothing and the audio is decoded all the way to the end. If
start_time_millisecondsis specified, then
end_time_millisecondsmust be greater. The resulting
A destination frame rate to resample the audio to. Do not specify this parameter if you wish Babycat to preserve the audio’s original frame rate. This does nothing if
frame_rate_hzis equal to the audio’s original frame rate.
Set this to a positive integer
nto select the first
nchannels stored in the audio file. By default, Babycat will return all of the channels in the original audio. This will raise an exception if you specify a
num_channelsgreater than the actual number of channels in the audio.
trueto average all channels into a single monophonic (mono) channel. If
num_channels = nis also specified, then only the first
nchannels will be averaged. Note that
convert_to_monocannot be set to
truewhile also setting
num_channels = 1.
If you set this to
true, Babycat will zero-pad the ending of the decoded waveform to ensure that the output waveform’s duration is exactly
end_time_milliseconds - start_time_milliseconds. By default,
zero_pad_ending = false, in which case the output waveform will be shorter than
end_time_milliseconds - start_time_millisecondsif the input audio is shorter than
Sets which resampling method is used if you have set
frame_rate_hz. This usually defaults to the highest-accuracy resampler compiled into Babycat. The available choices are:
Sets which audio decoding backend to use. Currently the only available decoding backend is [
babycat::DECODING_BACKEND_SYMPHONIA](crate::DECODING_BACKEND_SYMPHONIA), which corresponds to the [
SymphoniaDecoder](crate::decode::SymphoniaDecoder), which is a wrapper for the [