~aleteoryx/muditaos

ref: 3ed010cfd3df2c66b3ae6f9a7eb5fd3481b26351 muditaos/module-bsp/board/rt1051/bsp/audio/Codec.hpp -rw-r--r-- 777 bytes
3ed010cf — Artur Śleszyński [EGD-3119] Do not convert InputEvent to numeric if not digit 4 years ago
                                                                                
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
35
36
37
38
39
40
41
42
43
// Copyright (c) 2017-2020, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md

#ifndef PUREPHONE_CODEC_HPP
#define PUREPHONE_CODEC_HPP

#include <memory>
#include <optional>

class CodecParams
{
  public:
};

enum class CodecRetCode
{
    Success,
    InvalidSampleRate,
    InvalidInputPath,
    InvalidOutputPath,
    InvalidArgument
};

class Codec
{
  public:
    virtual ~Codec()
    {}

    virtual std::optional<uint32_t> Probe() = 0;

    virtual CodecRetCode Start(const CodecParams &param) = 0;

    virtual CodecRetCode Pause() = 0;

    virtual CodecRetCode Resume() = 0;

    virtual CodecRetCode Stop() = 0;

    virtual CodecRetCode Ioctrl(const CodecParams &param) = 0;
};

#endif // PUREPHONE_CODEC_HPP