Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mpd
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Иван Мажукин
mpd
Commits
ae67f44c
Commit
ae67f44c
authored
Oct 26, 2017
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
pcm/Dsd*: add "noexcept"
parent
54dd1ad0
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
12 additions
and
8 deletions
+12
-8
Dsd16.cxx
src/pcm/Dsd16.cxx
+4
-3
Dsd16.hxx
src/pcm/Dsd16.hxx
+2
-1
Dsd32.cxx
src/pcm/Dsd32.cxx
+4
-3
Dsd32.hxx
src/pcm/Dsd32.hxx
+2
-1
No files found.
src/pcm/Dsd16.cxx
View file @
ae67f44c
...
...
@@ -26,7 +26,7 @@
* Construct a 16 bit integer from two bytes.
*/
static
constexpr
inline
uint16_t
Construct16
(
uint8_t
a
,
uint8_t
b
)
Construct16
(
uint8_t
a
,
uint8_t
b
)
noexcept
{
/* "a" is the oldest byte, which must be in the most
significant byte */
...
...
@@ -35,13 +35,14 @@ Construct16(uint8_t a, uint8_t b)
}
static
constexpr
inline
uint16_t
Dsd8To16Sample
(
const
uint8_t
*
src
,
unsigned
channels
)
Dsd8To16Sample
(
const
uint8_t
*
src
,
unsigned
channels
)
noexcept
{
return
Construct16
(
src
[
0
],
src
[
channels
]);
}
ConstBuffer
<
uint16_t
>
Dsd8To16
(
PcmBuffer
&
buffer
,
unsigned
channels
,
ConstBuffer
<
uint8_t
>
_src
)
Dsd8To16
(
PcmBuffer
&
buffer
,
unsigned
channels
,
ConstBuffer
<
uint8_t
>
_src
)
noexcept
{
const
size_t
in_frames
=
_src
.
size
/
channels
;
const
size_t
out_frames
=
in_frames
/
2
;
...
...
src/pcm/Dsd16.hxx
View file @
ae67f44c
...
...
@@ -31,6 +31,7 @@ class PcmBuffer;
* Convert DSD_U8 to DSD_U16 (native endian, oldest bits in MSB).
*/
ConstBuffer
<
uint16_t
>
Dsd8To16
(
PcmBuffer
&
buffer
,
unsigned
channels
,
ConstBuffer
<
uint8_t
>
src
);
Dsd8To16
(
PcmBuffer
&
buffer
,
unsigned
channels
,
ConstBuffer
<
uint8_t
>
src
)
noexcept
;
#endif
src/pcm/Dsd32.cxx
View file @
ae67f44c
...
...
@@ -26,7 +26,7 @@
* Construct a 32 bit integer from four bytes.
*/
static
constexpr
inline
uint32_t
Construct32
(
uint8_t
a
,
uint8_t
b
,
uint8_t
c
,
uint8_t
d
)
Construct32
(
uint8_t
a
,
uint8_t
b
,
uint8_t
c
,
uint8_t
d
)
noexcept
{
/* "a" is the oldest byte, which must be in the most
significant byte */
...
...
@@ -36,14 +36,15 @@ Construct32(uint8_t a, uint8_t b, uint8_t c, uint8_t d)
}
static
constexpr
inline
uint32_t
Dsd8To32Sample
(
const
uint8_t
*
src
,
unsigned
channels
)
Dsd8To32Sample
(
const
uint8_t
*
src
,
unsigned
channels
)
noexcept
{
return
Construct32
(
src
[
0
],
src
[
channels
],
src
[
2
*
channels
],
src
[
3
*
channels
]);
}
ConstBuffer
<
uint32_t
>
Dsd8To32
(
PcmBuffer
&
buffer
,
unsigned
channels
,
ConstBuffer
<
uint8_t
>
_src
)
Dsd8To32
(
PcmBuffer
&
buffer
,
unsigned
channels
,
ConstBuffer
<
uint8_t
>
_src
)
noexcept
{
const
size_t
in_frames
=
_src
.
size
/
channels
;
const
size_t
out_frames
=
in_frames
/
4
;
...
...
src/pcm/Dsd32.hxx
View file @
ae67f44c
...
...
@@ -31,6 +31,7 @@ class PcmBuffer;
* Convert DSD_U8 to DSD_U32 (native endian, oldest bits in MSB).
*/
ConstBuffer
<
uint32_t
>
Dsd8To32
(
PcmBuffer
&
buffer
,
unsigned
channels
,
ConstBuffer
<
uint8_t
>
src
);
Dsd8To32
(
PcmBuffer
&
buffer
,
unsigned
channels
,
ConstBuffer
<
uint8_t
>
src
)
noexcept
;
#endif
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment