kwave
18.07.70
Main Page
Related Pages
+
Namespaces
Namespace List
+
Namespace Members
+
All
_
a
b
c
f
h
i
l
m
o
p
r
s
t
u
w
y
z
Functions
Typedefs
Enumerations
+
Enumerator
a
b
c
f
i
l
o
p
r
s
u
w
+
Classes
Class List
Class Index
Class Hierarchy
+
Class Members
+
All
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
+
Functions
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
z
~
+
Variables
a
b
c
d
e
f
g
h
i
m
n
p
r
s
t
v
w
x
y
z
Typedefs
Enumerations
+
Enumerator
a
b
c
d
e
f
g
i
l
m
n
o
p
r
s
t
u
v
w
Related Functions
+
Files
File List
+
File Members
+
All
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
+
Functions
_
a
b
c
d
e
f
i
l
m
p
q
r
s
t
x
z
Variables
Typedefs
+
Macros
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
t
u
v
w
x
z
SampleFormat.cpp
Go to the documentation of this file.
1
/***************************************************************************
2
SampleFormat.cpp - Map for all known sample formats
3
-------------------
4
begin : Sun Jul 28 2002
5
copyright : (C) 2002 by Thomas Eschenbacher
6
email : Thomas.Eschenbacher@gmx.de
7
***************************************************************************/
8
9
/***************************************************************************
10
* *
11
* This program is free software; you can redistribute it and/or modify *
12
* it under the terms of the GNU General Public License as published by *
13
* the Free Software Foundation; either version 2 of the License, or *
14
* (at your option) any later version. *
15
* *
16
***************************************************************************/
17
18
#include "
libkwave/SampleFormat.h
"
19
#include "
libkwave/String.h
"
20
21
//***************************************************************************
22
Kwave::SampleFormat::Map::Map
()
23
:
Kwave
::
TypesMap
<int,
Kwave
::
SampleFormat
::
Format
>()
24
{
25
fill
();
26
}
27
28
//***************************************************************************
29
Kwave::SampleFormat::Map::~Map
()
30
{
31
}
32
33
//***************************************************************************
34
void
Kwave::SampleFormat::Map::fill
()
35
{
36
append
(0,
Kwave::SampleFormat::Signed
,
_
(
"SIGNED"
),
37
_
(I18N_NOOP(
"Linear Two's Complement"
)));
38
append
(1,
Kwave::SampleFormat::Unsigned
,
_
(
"UNSIGNED"
),
39
_
(I18N_NOOP(
"Unsigned Integer"
)));
40
append
(2,
Kwave::SampleFormat::Float
,
_
(
"FLOAT"
),
41
_
(I18N_NOOP(
"32-bit IEEE Floating-Point"
)));
42
append
(3,
Kwave::SampleFormat::Double
,
_
(
"DOUBLE"
),
43
_
(I18N_NOOP(
"64-bit IEEE Double Precision Floating-Point"
)));
44
}
45
46
//***************************************************************************
47
void
Kwave::SampleFormat::fromInt
(
int
i)
48
{
49
Kwave::SampleFormat::Map
map;
50
Kwave::SampleFormat::Format
format =
51
static_cast<
Kwave::SampleFormat::Format
>
(i);
52
int
index = map.
findFromData
(format);
53
m_format
= (index >= 0) ? format :
Kwave::SampleFormat::Unknown
;
54
}
55
56
//***************************************************************************
57
//***************************************************************************
Kwave::SampleFormat::Map
Definition:
SampleFormat.h:83
Kwave::SampleFormat::Map::Map
Map()
Definition:
SampleFormat.cpp:22
Kwave::SampleFormat::Unsigned
Definition:
SampleFormat.h:41
Kwave
Definition:
App.h:33
Kwave::SampleFormat::Format
Format
Definition:
SampleFormat.h:38
Kwave::SampleFormat::Unknown
Definition:
SampleFormat.h:39
Kwave::SampleFormat
Definition:
SampleFormat.h:30
Kwave::SampleFormat::m_format
Format m_format
Definition:
SampleFormat.h:78
Kwave::SampleFormat::fromInt
void fromInt(int i)
Definition:
SampleFormat.cpp:47
Kwave::TypesMap< int, Format >::append
virtual void append(int index, Format data, const QString &name, const QString &description)
Definition:
TypesMap.h:72
Kwave::TypesMap
Definition:
TypesMap.h:37
Kwave::SampleFormat::Map::fill
virtual void fill() Q_DECL_OVERRIDE
Definition:
SampleFormat.cpp:34
Kwave::SampleFormat::Double
Definition:
SampleFormat.h:43
Kwave::SampleFormat::Float
Definition:
SampleFormat.h:42
Kwave::SampleFormat::Signed
Definition:
SampleFormat.h:40
SampleFormat.h
_
#define _(m)
Definition:
memcpy.c:66
Kwave::TypesMap::findFromData
IDX findFromData(const DATA &data) const
Definition:
TypesMap.h:89
Kwave::SampleFormat::Map::~Map
virtual ~Map() Q_DECL_OVERRIDE
Definition:
SampleFormat.cpp:29
String.h
libkwave
SampleFormat.cpp
Generated on Sat Mar 24 2018 09:10:25 for kwave by
1.8.13