diff options
author | Max Kellermann <max@musicpd.org> | 2018-03-15 20:00:14 +0100 |
---|---|---|
committer | Max Kellermann <max@musicpd.org> | 2018-03-15 20:00:14 +0100 |
commit | 37b07a5e7ca254fac74aa1f53c9b91f194e37d84 (patch) | |
tree | a28eab74b606e289c5720de1d2a71a51821580d7 /src/pcm | |
parent | 73013a3c044fef94a6cdc9a422f85b8c86f27c1a (diff) |
pcm/PcmDop: use size_t
Diffstat (limited to 'src/pcm')
-rw-r--r-- | src/pcm/PcmDop.cxx | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/pcm/PcmDop.cxx b/src/pcm/PcmDop.cxx index 8fad889c2..e54276140 100644 --- a/src/pcm/PcmDop.cxx +++ b/src/pcm/PcmDop.cxx @@ -46,19 +46,19 @@ pcm_dsd_to_dop(PcmBuffer &buffer, unsigned channels, assert(audio_valid_channel_count(channels)); assert(_src.size % channels == 0); - const unsigned num_src_samples = _src.size; - const unsigned num_src_frames = num_src_samples / channels; + const size_t num_src_samples = _src.size; + const size_t num_src_frames = num_src_samples / channels; /* this rounds down and discards the last odd frame; not elegant, but good enough for now */ - const unsigned num_frames = num_src_frames / 2; - const unsigned num_samples = num_frames * channels; + const size_t num_frames = num_src_frames / 2; + const size_t num_samples = num_frames * channels; uint32_t *const dest0 = (uint32_t *)buffer.GetT<uint32_t>(num_samples), *dest = dest0; auto src = _src.data; - for (unsigned i = num_frames / 2; i > 0; --i) { + for (size_t i = num_frames / 2; i > 0; --i) { for (unsigned c = channels; c > 0; --c) { /* each 24 bit sample has 16 DSD sample bits plus the magic 0x05 marker */ |