aboutsummaryrefslogtreecommitdiffstats
path: root/src/decoder/DsdLib.hxx
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/decoder/DsdLib.hxx12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/decoder/DsdLib.hxx b/src/decoder/DsdLib.hxx
index 6b7498df1..25329e650 100644
--- a/src/decoder/DsdLib.hxx
+++ b/src/decoder/DsdLib.hxx
@@ -20,6 +20,7 @@
#ifndef MPD_DECODER_DSDLIB_HXX
#define MPD_DECODER_DSDLIB_HXX
+#include "system/ByteOrder.hxx"
#include "Compiler.h"
#include <stddef.h>
@@ -35,6 +36,17 @@ struct DsdId {
bool Equals(const char *s) const;
};
+class DsdUint64 {
+ uint32_t lo;
+ uint32_t hi;
+
+public:
+ constexpr uint64_t Read() const {
+ return (uint64_t(FromLE32(hi)) << 32) |
+ uint64_t(FromLE32(lo));
+ }
+};
+
bool
dsdlib_read(Decoder *decoder, InputStream &is,
void *data, size_t length);