summaryrefslogtreecommitdiff
path: root/src/audio/include/audio_decoder.hpp
blob: f460f9e94cd40d8901ff5ddb9601992d23b816a8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#pragma once

#include <cstddef>
#include "ff.h"

namespace audio {

enum SampleRate {};
enum BitDepth {};

struct PcmStreamHeader {
  SampleRate sample_rate;
  BitDepth bit_depth;
  bool configure_now;
};

class AudioDecoder {
 public:
  AudioDecoder();
  ~AudioDecoder();

  auto SetSource(RingbufHandle_t& source) -> void;

  enum Status {};
  auto ProcessChunk() -> Status;

  auto GetOutputStream() const -> RingbufHandle_t;

 private:
  RingbufHandle_t input_;
  RingbufHandle_t output_;
};

}  // namespace audio