mirror of
https://github.com/mudita/MuditaOS.git
synced 2026-04-21 23:50:31 -04:00
Fix of the issue that only files with extension in lowercase were detected and listed in the music player's library. Additionally code cleanup.
29 lines
647 B
C++
29 lines
647 B
C++
// Copyright (c) 2017-2022, Mudita Sp. z.o.o. All rights reserved.
|
|
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md
|
|
|
|
#pragma once
|
|
|
|
#include "Decoder.hpp"
|
|
|
|
namespace audio
|
|
{
|
|
namespace internal
|
|
{
|
|
struct wavContext;
|
|
}
|
|
class decoderWAV : public Decoder
|
|
{
|
|
public:
|
|
explicit decoderWAV(const std::string &filePath);
|
|
virtual ~decoderWAV();
|
|
|
|
std::uint32_t decode(std::uint32_t samplesToRead, std::int16_t *pcmData) override;
|
|
|
|
void setPosition(float pos) override;
|
|
|
|
private:
|
|
std::unique_ptr<internal::wavContext> decoderContext;
|
|
};
|
|
|
|
} // namespace audio
|