diff options
author | Max Kellermann <max@duempel.org> | 2014-08-21 13:09:14 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2014-08-21 13:09:14 +0200 |
commit | 6d41f3626694d7f16b657e8b2f3abb2816b1f649 (patch) | |
tree | f8aea56cb0ae68454e9aec3801f008050f8b604f | |
parent | 57cbcdf2ecc8ff2a5b093f01028ea887f088a8aa (diff) | |
download | mpd-6d41f3626694d7f16b657e8b2f3abb2816b1f649.tar.gz mpd-6d41f3626694d7f16b657e8b2f3abb2816b1f649.tar.xz mpd-6d41f3626694d7f16b657e8b2f3abb2816b1f649.zip |
decoder/dsf: use memcpy()
Diffstat (limited to '')
-rw-r--r-- | src/decoder/plugins/DsfDecoderPlugin.cxx | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/decoder/plugins/DsfDecoderPlugin.cxx b/src/decoder/plugins/DsfDecoderPlugin.cxx index 585819f52..20102c43e 100644 --- a/src/decoder/plugins/DsfDecoderPlugin.cxx +++ b/src/decoder/plugins/DsfDecoderPlugin.cxx @@ -39,6 +39,8 @@ #include "tag/TagHandler.hxx" #include "Log.hxx" +#include <string.h> + struct DsfMetaData { unsigned sample_rate, channels; bool bitreverse; @@ -208,10 +210,7 @@ dsf_to_pcm_order(uint8_t *dest, size_t nrbytes) j++; } - for (unsigned i = 0; i < (unsigned)nrbytes; i++) { - *dest = scratch[i]; - dest++; - } + memcpy(dest, scratch, nrbytes); } /** |