Renamed func params to something more natural
This commit is contained in:
@@ -41,7 +41,7 @@ extern "C"
|
|||||||
|
|
||||||
namespace lms::audio
|
namespace lms::audio
|
||||||
{
|
{
|
||||||
std::unique_ptr<IPcmDecoder> createPcmDecoder(const std::filesystem::path& filePath, const PcmDecoderParameters& parameters)
|
std::unique_ptr<IPcmDecoder> createPcmDecoder(const std::filesystem::path& filePath, const PcmOutputParameters& parameters)
|
||||||
{
|
{
|
||||||
return std::make_unique<ffmpeg::PcmDecoder>(filePath, parameters);
|
return std::make_unique<ffmpeg::PcmDecoder>(filePath, parameters);
|
||||||
}
|
}
|
||||||
@@ -69,7 +69,7 @@ namespace lms::audio::ffmpeg
|
|||||||
}
|
}
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|
||||||
PcmDecoder::PcmDecoder(const std::filesystem::path& filePath, const PcmDecoderParameters& parameters)
|
PcmDecoder::PcmDecoder(const std::filesystem::path& filePath, const PcmOutputParameters& parameters)
|
||||||
: _parameters{ parameters }
|
: _parameters{ parameters }
|
||||||
{
|
{
|
||||||
if (_parameters.channelCount > AV_NUM_DATA_POINTERS)
|
if (_parameters.channelCount > AV_NUM_DATA_POINTERS)
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ namespace lms::audio::ffmpeg
|
|||||||
class PcmDecoder : public IPcmDecoder
|
class PcmDecoder : public IPcmDecoder
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
PcmDecoder(const std::filesystem::path& filePath, const PcmDecoderParameters& parameters);
|
PcmDecoder(const std::filesystem::path& filePath, const PcmOutputParameters& parameters);
|
||||||
~PcmDecoder() override;
|
~PcmDecoder() override;
|
||||||
|
|
||||||
PcmDecoder(const PcmDecoder&) = delete;
|
PcmDecoder(const PcmDecoder&) = delete;
|
||||||
@@ -43,7 +43,7 @@ namespace lms::audio::ffmpeg
|
|||||||
std::size_t drainResampler(std::span<WritableBuffer> outputChannelBuffers, std::size_t maxSamplesPerChannel);
|
std::size_t drainResampler(std::span<WritableBuffer> outputChannelBuffers, std::size_t maxSamplesPerChannel);
|
||||||
std::size_t getEstimatedResamplerAvailableSamples() const;
|
std::size_t getEstimatedResamplerAvailableSamples() const;
|
||||||
|
|
||||||
const PcmDecoderParameters _parameters;
|
const PcmOutputParameters _parameters;
|
||||||
|
|
||||||
bool _finished{};
|
bool _finished{};
|
||||||
bool _eof{};
|
bool _eof{};
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ namespace lms::audio
|
|||||||
Float64,
|
Float64,
|
||||||
};
|
};
|
||||||
|
|
||||||
struct PcmDecoderParameters
|
struct PcmOutputParameters
|
||||||
{
|
{
|
||||||
unsigned channelCount;
|
unsigned channelCount;
|
||||||
unsigned sampleRate;
|
unsigned sampleRate;
|
||||||
@@ -61,5 +61,5 @@ namespace lms::audio
|
|||||||
};
|
};
|
||||||
|
|
||||||
// Throw on error
|
// Throw on error
|
||||||
std::unique_ptr<IPcmDecoder> createPcmDecoder(const std::filesystem::path& filePath, const PcmDecoderParameters& parameters);
|
std::unique_ptr<IPcmDecoder> createPcmDecoder(const std::filesystem::path& filePath, const PcmOutputParameters& parameters);
|
||||||
} // namespace lms::audio
|
} // namespace lms::audio
|
||||||
Reference in New Issue
Block a user