Qmmp
src
qmmp
audioparameters.h
1
/***************************************************************************
2
* Copyright (C) 2009-2020 by Ilya Kotov *
3
* forkotov02@ya.ru *
4
* *
5
* This program is free software; you can redistribute it and/or modify *
6
* it under the terms of the GNU General Public License as published by *
7
* the Free Software Foundation; either version 2 of the License, or *
8
* (at your option) any later version. *
9
* *
10
* This program is distributed in the hope that it will be useful, *
11
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
12
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
13
* GNU General Public License for more details. *
14
* *
15
* You should have received a copy of the GNU General Public License *
16
* along with this program; if not, write to the *
17
* Free Software Foundation, Inc., *
18
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
19
***************************************************************************/
20
21
#ifndef AUDIOPARAMETERS_H
22
#define AUDIOPARAMETERS_H
23
24
#include <QtGlobal>
25
#include "channelmap.h"
26
#include "qmmp.h"
27
31
class
QMMP_EXPORT
AudioParameters
32
{
33
public
:
34
38
enum
ByteOrder
39
{
40
LittleEndian = 0,
41
BigEndian
42
};
46
AudioParameters
();
53
AudioParameters
(quint32 srate,
const
ChannelMap &map,
Qmmp::AudioFormat
format);
57
AudioParameters
(
const
AudioParameters
&other);
61
AudioParameters
&operator=(
const
AudioParameters
&p);
65
bool
operator==(
const
AudioParameters
&p)
const
;
69
bool
operator!=(
const
AudioParameters
&p)
const
;
73
quint32 sampleRate()
const
;
77
int
channels()
const
;
81
const
ChannelMap channelMap()
const
;
85
Qmmp::AudioFormat
format()
const
;
89
int
sampleSize()
const
;
94
int
frameSize()
const
;
98
int
bitsPerSample()
const
;
103
int
validBitsPerSample()
const
;
107
ByteOrder byteOrder()
const
;
112
const
QString toString()
const
;
116
static
int
sampleSize(
Qmmp::AudioFormat
format);
120
static
int
bitsPerSample(
Qmmp::AudioFormat
format);
125
static
int
validBitsPerSample(
Qmmp::AudioFormat
format);
132
static
Qmmp::AudioFormat
findAudioFormat(
int
bits, ByteOrder byteOrder = LittleEndian);
133
134
private
:
135
quint32 m_srate;
136
ChannelMap m_chan_map;
137
Qmmp::AudioFormat
m_format;
138
int
m_sz;
139
int
m_precision;
140
};
141
142
#endif // AUDIOPARAMETERS_H
AudioParameters
The AudioParameters class keeps information about audio settings.
Definition:
audioparameters.h:31
Qmmp::AudioFormat
AudioFormat
Definition:
qmmp.h:114
AudioParameters::ByteOrder
ByteOrder
Definition:
audioparameters.h:38
Generated on Thu Aug 20 2020 13:40:03 for Qmmp by
1.8.15