~aleteoryx/muditaos

ref: fe79d2d934e34e36af20d6875e74a185bedffc49 muditaos/module-audio/Audio/StreamProxy.cpp -rw-r--r-- 1.8 KiB
fe79d2d9 — Bartosz Cichocki [EGD-6809] Block building unrebased commit 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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
// Copyright (c) 2017-2021, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md

#include "StreamProxy.hpp"
#include "AbstractStream.hpp"

using audio::StreamProxy;

StreamProxy::StreamProxy(AbstractStream &wrappedStream) noexcept : wrappedStream(wrappedStream)
{}

bool StreamProxy::push(void *data, std::size_t dataSize)
{
    return wrappedStream.push(data, dataSize);
}

bool StreamProxy::push(const Span &span)
{
    return wrappedStream.push(span);
}

bool StreamProxy::push()
{
    return wrappedStream.push();
}

bool StreamProxy::pop(Span &span)
{
    return wrappedStream.pop(span);
}

bool StreamProxy::reserve(Span &span)
{
    return wrappedStream.reserve(span);
}

void StreamProxy::commit()
{
    wrappedStream.commit();
}

void StreamProxy::release()
{
    wrappedStream.release();
}

bool StreamProxy::peek(Span &span)
{
    return wrappedStream.peek(span);
}

void StreamProxy::consume()
{
    wrappedStream.consume();
}

void StreamProxy::unpeek()
{
    wrappedStream.unpeek();
}

void StreamProxy::reset()
{
    wrappedStream.reset();
}

void StreamProxy::registerListener(EventListener *listener)
{
    wrappedStream.registerListener(listener);
}

void StreamProxy::unregisterListeners(EventListener *listener)
{
    wrappedStream.unregisterListeners(listener);
}

auto StreamProxy::getOutputTraits() const noexcept -> Traits
{
    return wrappedStream.getOutputTraits();
}

auto StreamProxy::getInputTraits() const noexcept -> Traits
{
    return wrappedStream.getInputTraits();
}

bool StreamProxy::isEmpty() const noexcept
{
    return wrappedStream.isEmpty();
}

bool StreamProxy::isFull() const noexcept
{
    return wrappedStream.isFull();
}

auto StreamProxy::getWrappedStream() -> AbstractStream &
{
    return wrappedStream;
}