Commit 1708ae3e authored by Max Kellermann's avatar Max Kellermann

pcm/Dsd2Pcm: use `uint8_t` instead of `unsigned char`

parent 6bfbc5d3
......@@ -175,7 +175,7 @@ Dsd2Pcm::CalcOutputSample(unsigned ffp) const noexcept
void
Dsd2Pcm::Translate(size_t samples,
const unsigned char *src, ptrdiff_t src_stride,
const uint8_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;
unsigned char *p = fifo + ((ffp-CTABLES) & FIFOMASK);
uint8_t *p = fifo + ((ffp-CTABLES) & FIFOMASK);
*p = bit_reverse(*p);
*dst = CalcOutputSample(ffp);
dst += dst_stride;
......
......@@ -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;
unsigned char fifo[FIFOSIZE];
uint8_t fifo[FIFOSIZE];
unsigned fifopos;
public:
......@@ -70,7 +71,7 @@ public:
* @param dst_stride -- dst pointer increment
*/
void Translate(size_t samples,
const unsigned char *src, ptrdiff_t src_stride,
const uint8_t *src, ptrdiff_t src_stride,
bool lsbitfirst,
float *dst, ptrdiff_t dst_stride) noexcept;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment