Audacity
3.2.0
Toggle main menu visibility
Main Page
Related Pages
Modules
Namespaces
Namespace List
Namespace 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
y
z
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
y
Variables
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
Typedefs
a
b
c
d
e
f
g
h
i
l
m
n
p
r
s
t
u
v
Enumerations
b
c
d
e
f
g
i
l
m
n
o
p
r
s
t
u
w
z
Enumerator
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
t
u
v
w
Classes
Class List
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
x
y
z
~
Variables
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
Enumerations
a
b
c
d
e
f
h
i
k
l
m
o
p
r
s
t
x
Enumerator
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
t
u
v
w
y
Related Functions
a
b
c
d
e
f
g
l
m
n
o
p
r
s
t
v
w
Files
File List
File 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
x
z
Variables
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
y
z
Typedefs
a
b
c
d
e
f
g
h
i
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Enumerations
a
c
d
e
f
k
l
m
n
o
p
r
s
t
u
v
z
Enumerator
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
z
Macros
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
libraries
lib-math
SampleCount.cpp
Go to the documentation of this file.
1
/**********************************************************************
2
3
Audacity: A Digital Audio Editor
4
5
@file SampleCount.cpp
6
7
Paul Licameli split from audacity/Types.h
8
9
**********************************************************************/
10
#include "
SampleCount.h
"
11
12
#include <algorithm>
13
14
#include <wx/debug.h>
15
16
size_t
sampleCount::as_size_t
()
const
{
17
assert(
value
>= 0);
18
assert(
static_cast<
std::make_unsigned_t<type>
>
(
value
) <= std::numeric_limits<size_t>::max());
19
return
value
;
20
}
21
22
size_t
limitSampleBufferSize
(
size_t
bufferSize,
sampleCount
limit )
23
{
24
return
25
std::min
(
sampleCount
( bufferSize ), std::max(
sampleCount
(0), limit ) )
26
.as_size_t();
27
}
min
int min(int a, int b)
Definition:
CompareAudioCommand.cpp:114
limitSampleBufferSize
size_t limitSampleBufferSize(size_t bufferSize, sampleCount limit)
Definition:
SampleCount.cpp:22
SampleCount.h
sampleCount
Positions or offsets within audio files need a wide type.
Definition:
SampleCount.h:19
sampleCount::value
type value
Definition:
SampleCount.h:72
sampleCount::as_size_t
size_t as_size_t() const
Definition:
SampleCount.cpp:16
Generated by
1.9.3