lmms
Cross-platform music production software
Toggle main menu visibility
Loading...
Searching...
No Matches
include
OutputSettings.h
Go to the documentation of this file.
1
/*
2
* OutputSettings.h - Stores the settings for file rendering
3
*
4
* Copyright (c) 2008-2009 Tobias Doerffel <tobydox/at/users.sourceforge.net>
5
* Copyright (c) 2017 Michael Gregorius <michael.gregorius.git/at/arcor[dot]de>
6
*
7
* This file is part of LMMS - https://lmms.io
8
*
9
* This program is free software; you can redistribute it and/or
10
* modify it under the terms of the GNU General Public
11
* License as published by the Free Software Foundation; either
12
* version 2 of the License, or (at your option) any later version.
13
*
14
* This program is distributed in the hope that it will be useful,
15
* but WITHOUT ANY WARRANTY; without even the implied warranty of
16
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17
* General Public License for more details.
18
*
19
* You should have received a copy of the GNU General Public
20
* License along with this program (see COPYING); if not, write to the
21
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
22
* Boston, MA 02110-1301 USA.
23
*
24
*/
25
26
#ifndef LMMS_OUTPUT_SETTINGS_H
27
#define LMMS_OUTPUT_SETTINGS_H
28
29
#include "
LmmsTypes.h
"
30
31
namespace
lmms
32
{
33
34
35
class
OutputSettings
36
{
37
public
:
38
enum class
BitDepth
39
{
40
Depth16Bit,
41
Depth24Bit,
42
Depth32Bit,
43
Count
44
};
45
46
enum class
StereoMode
47
{
48
Mono,
49
Stereo,
50
JointStereo,
51
Count
52
};
53
54
public
:
55
OutputSettings
(
sample_rate_t
sampleRate,
bitrate_t
bitRate,
BitDepth
bitDepth,
StereoMode
stereoMode)
56
:
m_sampleRate
(sampleRate)
57
,
m_bitRate
(bitRate)
58
,
m_bitDepth
(bitDepth)
59
,
m_stereoMode
(stereoMode)
60
,
m_compressionLevel
(0.625)
// 5/8
61
{
62
}
63
64
OutputSettings
(
sample_rate_t
sampleRate,
bitrate_t
bitRate,
BitDepth
bitDepth)
65
:
OutputSettings
(sampleRate, bitRate, bitDepth,
StereoMode
::Stereo)
66
{
67
}
68
69
sample_rate_t
getSampleRate
()
const
{
return
m_sampleRate
; }
70
void
setSampleRate
(
sample_rate_t
sampleRate) {
m_sampleRate
= sampleRate; }
71
72
bitrate_t
bitrate
()
const
{
return
m_bitRate
; }
73
void
setBitrate
(
bitrate_t
bitrate
) {
m_bitRate
=
bitrate
; }
74
75
BitDepth
getBitDepth
()
const
{
return
m_bitDepth
; }
76
void
setBitDepth
(
BitDepth
bitDepth) {
m_bitDepth
= bitDepth; }
77
78
StereoMode
getStereoMode
()
const
{
return
m_stereoMode
; }
79
void
setStereoMode
(
StereoMode
stereoMode) {
m_stereoMode
= stereoMode; }
80
81
82
double
getCompressionLevel
()
const
{
return
m_compressionLevel
; }
83
void
setCompressionLevel
(
double
level){
84
// legal range is 0.0 to 1.0.
85
m_compressionLevel
= level;
86
}
87
88
private
:
89
sample_rate_t
m_sampleRate
;
90
bitrate_t
m_bitRate
;
91
BitDepth
m_bitDepth
;
92
StereoMode
m_stereoMode
;
93
double
m_compressionLevel
;
94
};
95
96
97
}
// namespace lmms
98
99
#endif
// LMMS_OUTPUT_SETTINGS_H
LmmsTypes.h
lmms::OutputSettings::m_bitDepth
BitDepth m_bitDepth
Definition
OutputSettings.h:91
lmms::OutputSettings::m_bitRate
bitrate_t m_bitRate
Definition
OutputSettings.h:90
lmms::OutputSettings::m_compressionLevel
double m_compressionLevel
Definition
OutputSettings.h:93
lmms::OutputSettings::m_stereoMode
StereoMode m_stereoMode
Definition
OutputSettings.h:92
lmms::OutputSettings::OutputSettings
OutputSettings(sample_rate_t sampleRate, bitrate_t bitRate, BitDepth bitDepth)
Definition
OutputSettings.h:64
lmms::OutputSettings::setSampleRate
void setSampleRate(sample_rate_t sampleRate)
Definition
OutputSettings.h:70
lmms::OutputSettings::getStereoMode
StereoMode getStereoMode() const
Definition
OutputSettings.h:78
lmms::OutputSettings::getCompressionLevel
double getCompressionLevel() const
Definition
OutputSettings.h:82
lmms::OutputSettings::StereoMode
StereoMode
Definition
OutputSettings.h:47
lmms::OutputSettings::setCompressionLevel
void setCompressionLevel(double level)
Definition
OutputSettings.h:83
lmms::OutputSettings::getBitDepth
BitDepth getBitDepth() const
Definition
OutputSettings.h:75
lmms::OutputSettings::setBitDepth
void setBitDepth(BitDepth bitDepth)
Definition
OutputSettings.h:76
lmms::OutputSettings::setStereoMode
void setStereoMode(StereoMode stereoMode)
Definition
OutputSettings.h:79
lmms::OutputSettings::setBitrate
void setBitrate(bitrate_t bitrate)
Definition
OutputSettings.h:73
lmms::OutputSettings::BitDepth
BitDepth
Definition
OutputSettings.h:39
lmms::OutputSettings::getSampleRate
sample_rate_t getSampleRate() const
Definition
OutputSettings.h:69
lmms::OutputSettings::OutputSettings
OutputSettings(sample_rate_t sampleRate, bitrate_t bitRate, BitDepth bitDepth, StereoMode stereoMode)
Definition
OutputSettings.h:55
lmms::OutputSettings::bitrate
bitrate_t bitrate() const
Definition
OutputSettings.h:72
lmms::OutputSettings::m_sampleRate
sample_rate_t m_sampleRate
Definition
OutputSettings.h:89
lmms
Definition
RemotePluginBase.cpp:34
lmms::sample_rate_t
std::uint32_t sample_rate_t
Definition
LmmsTypes.h:42
lmms::bitrate_t
std::uint16_t bitrate_t
Definition
LmmsTypes.h:46
lmms::SfxrWave::Count
@ Count
Definition
Sfxr.h:43
Generated on
for lmms by
1.18.0