function encode_audio_file(const std::string &, const audio_data_interleaved &, const audiofile_format &, audio_decoder *, const audio_encoding_options &) audio¶
expected<void, audiofile_error> encode_audio_file(const std::string& path,
const audio_data_interleaved& data,
const audiofile_format& format,
audio_decoder* copyMetadataFrom = nullptr,
const audio_encoding_options& options = { … } Encodes interleaved audio data and writes it to a file (Windows-specific overload).
| path | The file path for the encoded audio. |
| data | The interleaved audio data to encode. |
| format | The desired audio file format. |
| copyMetadataFrom | Optional audio decoder to copy metadata from. |
| options | Optional encoding options. |
| An expected object containing void on success or an audiofile_error on failure. |
Defined at audio/encoder.hpp:229