OpenShot Audio Library | OpenShotAudio 0.4.0

Loading...
Searching...
No Matches
juce_MPEValue.h
1/*
2 ==============================================================================
3
4 This file is part of the JUCE library.
5 Copyright (c) 2022 - Raw Material Software Limited
6
7 JUCE is an open source library subject to commercial or open-source
8 licensing.
9
10 The code included in this file is provided under the terms of the ISC license
11 http://www.isc.org/downloads/software-support-policy/isc-license. Permission
12 To use, copy, modify, and/or distribute this software for any purpose with or
13 without fee is hereby granted provided that the above copyright notice and
14 this permission notice appear in all copies.
15
16 JUCE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER
17 EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE
18 DISCLAIMED.
19
20 ==============================================================================
21*/
22
23 namespace juce
24{
25
26//==============================================================================
36 class JUCE_API MPEValue
37{
38 public:
39 //==============================================================================
44 MPEValue() noexcept;
45
49 static MPEValue from7BitInt (int value) noexcept;
50
54 static MPEValue from14BitInt (int value) noexcept;
55
57 static MPEValue fromUnsignedFloat (float value) noexcept;
58
60 static MPEValue fromSignedFloat (float value) noexcept;
61
63 static MPEValue centreValue() noexcept;
64
66 static MPEValue minValue() noexcept;
67
69 static MPEValue maxValue() noexcept;
70
76 int as7BitInt() const noexcept;
77
83 int as14BitInt() const noexcept;
84
86 float asSignedFloat() const noexcept;
87
89 float asUnsignedFloat() const noexcept;
90
92 bool operator== (const MPEValue& other) const noexcept;
93
95 bool operator!= (const MPEValue& other) const noexcept;
96
97 private:
98 //==============================================================================
99 MPEValue (int normalisedValue);
100 int normalisedValue = 8192;
101};
102
103} // namespace juce
juce::MPEValue
Definition juce_MPEValue.h:37