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
1708ae3e
Commit
1708ae3e
authored
Jan 14, 2020
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
pcm/Dsd2Pcm: use `uint8_t` instead of `unsigned char`
parent
6bfbc5d3
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
4 deletions
+5
-4
Dsd2Pcm.cxx
src/pcm/Dsd2Pcm.cxx
+2
-2
Dsd2Pcm.hxx
src/pcm/Dsd2Pcm.hxx
+3
-2
No files found.
src/pcm/Dsd2Pcm.cxx
View file @
1708ae3e
...
...
@@ -175,7 +175,7 @@ Dsd2Pcm::CalcOutputSample(unsigned ffp) const noexcept
void
Dsd2Pcm
::
Translate
(
size_t
samples
,
const
u
nsigned
char
*
src
,
ptrdiff_t
src_stride
,
const
u
int8_t
*
src
,
ptrdiff_t
src_stride
,
bool
lsbf
,
float
*
dst
,
ptrdiff_t
dst_stride
)
noexcept
{
...
...
@@ -184,7 +184,7 @@ Dsd2Pcm::Translate(size_t samples,
unsigned
bite1
=
*
src
&
0xFFu
;
if
(
lsbf
)
bite1
=
bit_reverse
(
bite1
);
fifo
[
ffp
]
=
bite1
;
src
+=
src_stride
;
u
nsigned
char
*
p
=
fifo
+
((
ffp
-
CTABLES
)
&
FIFOMASK
);
u
int8_t
*
p
=
fifo
+
((
ffp
-
CTABLES
)
&
FIFOMASK
);
*
p
=
bit_reverse
(
*
p
);
*
dst
=
CalcOutputSample
(
ffp
);
dst
+=
dst_stride
;
...
...
src/pcm/Dsd2Pcm.hxx
View file @
1708ae3e
...
...
@@ -32,6 +32,7 @@ or implied, of Sebastian Gesemann.
#define DSD2PCM_H_INCLUDED
#include <stddef.h>
#include <stdint.h>
/**
* A "dsd2pcm engine" for one channel.
...
...
@@ -45,7 +46,7 @@ private:
/** bit mask for FIFO offsets */
static
constexpr
size_t
FIFOMASK
=
FIFOSIZE
-
1
;
u
nsigned
char
fifo
[
FIFOSIZE
];
u
int8_t
fifo
[
FIFOSIZE
];
unsigned
fifopos
;
public
:
...
...
@@ -70,7 +71,7 @@ public:
* @param dst_stride -- dst pointer increment
*/
void
Translate
(
size_t
samples
,
const
u
nsigned
char
*
src
,
ptrdiff_t
src_stride
,
const
u
int8_t
*
src
,
ptrdiff_t
src_stride
,
bool
lsbitfirst
,
float
*
dst
,
ptrdiff_t
dst_stride
)
noexcept
;
...
...
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