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
bc5b6470
Commit
bc5b6470
authored
Jan 14, 2020
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
pcm/Dsd2Pcm: use `sizet_t` instead of `unsigned`
parent
1708ae3e
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
5 deletions
+5
-5
Dsd2Pcm.cxx
src/pcm/Dsd2Pcm.cxx
+3
-3
Dsd2Pcm.hxx
src/pcm/Dsd2Pcm.hxx
+2
-2
No files found.
src/pcm/Dsd2Pcm.cxx
View file @
bc5b6470
...
...
@@ -162,10 +162,10 @@ Dsd2Pcm::Reset() noexcept
}
inline
float
Dsd2Pcm
::
CalcOutputSample
(
unsigned
ffp
)
const
noexcept
Dsd2Pcm
::
CalcOutputSample
(
size_t
ffp
)
const
noexcept
{
double
acc
=
0
;
for
(
unsigned
i
=
0
;
i
<
CTABLES
;
++
i
)
{
for
(
size_t
i
=
0
;
i
<
CTABLES
;
++
i
)
{
unsigned
bite1
=
fifo
[(
ffp
-
i
)
&
FIFOMASK
]
&
0xFF
;
unsigned
bite2
=
fifo
[(
ffp
-
(
CTABLES
*
2
-
1
)
+
i
)
&
FIFOMASK
]
&
0xFF
;
acc
+=
ctables
[
i
][
bite1
]
+
ctables
[
i
][
bite2
];
...
...
@@ -179,7 +179,7 @@ Dsd2Pcm::Translate(size_t samples,
bool
lsbf
,
float
*
dst
,
ptrdiff_t
dst_stride
)
noexcept
{
unsigned
ffp
=
fifopos
;
size_t
ffp
=
fifopos
;
while
(
samples
--
>
0
)
{
unsigned
bite1
=
*
src
&
0xFFu
;
if
(
lsbf
)
bite1
=
bit_reverse
(
bite1
);
...
...
src/pcm/Dsd2Pcm.hxx
View file @
bc5b6470
...
...
@@ -47,7 +47,7 @@ private:
static
constexpr
size_t
FIFOMASK
=
FIFOSIZE
-
1
;
uint8_t
fifo
[
FIFOSIZE
];
unsigned
fifopos
;
size_t
fifopos
;
public
:
Dsd2Pcm
()
noexcept
{
...
...
@@ -76,7 +76,7 @@ public:
float
*
dst
,
ptrdiff_t
dst_stride
)
noexcept
;
private
:
float
CalcOutputSample
(
unsigned
ffp
)
const
noexcept
;
float
CalcOutputSample
(
size_t
ffp
)
const
noexcept
;
};
#endif
/* include guard DSD2PCM_H_INCLUDED */
...
...
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