// Copyright (c) 2012-2023 Wojciech Figat. All rights reserved. #pragma once #include "Engine/Audio/Types.h" #include "Engine/Core/Types/DataContainer.h" /// /// Interface used for implementations that encodes set of PCM samples into a target audio format. /// class AudioEncoder { public: /// /// Finalizes an instance of the class. /// virtual ~AudioEncoder() { } public: /// /// Converts the input PCM samples buffer into the encoder audio format. /// /// The buffer containing samples in PCM format. All samples should be in signed integer format. /// The input information describing meta-data of the audio in the samples buffer. /// The output data. /// The output data compression quality (normalized in range [0;1]). /// True if the data is invalid or conversion failed, otherwise false. virtual bool Convert(byte* samples, AudioDataInfo& info, BytesContainer& result, float quality = 0.5f) = 0; };