aboutsummaryrefslogtreecommitdiffstats
path: root/src/decoder/DsfDecoderPlugin.cxx
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2013-10-28 23:12:48 +0100
committerMax Kellermann <max@duempel.org>2013-10-28 23:12:48 +0100
commitfd3dc7e5fb37883c62ec4e30978d482e82e30b16 (patch)
tree003c18a0d4e1d9d99425c13854392468cd7086b8 /src/decoder/DsfDecoderPlugin.cxx
parentc37edfd3e934944283ccd943a2abb48adf7752d9 (diff)
downloadmpd-fd3dc7e5fb37883c62ec4e30978d482e82e30b16.tar.gz
mpd-fd3dc7e5fb37883c62ec4e30978d482e82e30b16.tar.xz
mpd-fd3dc7e5fb37883c62ec4e30978d482e82e30b16.zip
decoder/dsdlib: convert struct dsdlib_id to a class
Diffstat (limited to 'src/decoder/DsfDecoderPlugin.cxx')
-rw-r--r--src/decoder/DsfDecoderPlugin.cxx12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/decoder/DsfDecoderPlugin.cxx b/src/decoder/DsfDecoderPlugin.cxx
index 10a88d370..5b1044455 100644
--- a/src/decoder/DsfDecoderPlugin.cxx
+++ b/src/decoder/DsfDecoderPlugin.cxx
@@ -54,7 +54,7 @@ struct DsfMetaData {
struct DsfHeader {
/** DSF header id: "DSD " */
- struct dsdlib_id id;
+ DsdId id;
/** DSD chunk size, including id = 28 */
uint32_t size_low, size_high;
/** total file size */
@@ -66,7 +66,7 @@ struct DsfHeader {
/** DSF file fmt chunk */
struct DsfFmtChunk {
/** id: "fmt " */
- struct dsdlib_id id;
+ DsdId id;
/** fmt chunk size, including id, normally 52 */
uint32_t size_low, size_high;
/** version of this format = 1 */
@@ -90,7 +90,7 @@ struct DsfFmtChunk {
};
struct DsfDataChunk {
- struct dsdlib_id id;
+ DsdId id;
/** "data" chunk size, includes header (id+size) */
uint32_t size_low, size_high;
};
@@ -105,7 +105,7 @@ dsf_read_metadata(Decoder *decoder, InputStream &is,
uint64_t chunk_size;
DsfHeader dsf_header;
if (!dsdlib_read(decoder, is, &dsf_header, sizeof(dsf_header)) ||
- !dsdlib_id_equals(&dsf_header.id, "DSD "))
+ !dsf_header.id.Equals("DSD "))
return false;
chunk_size = (uint64_t(FromLE32(dsf_header.size_high)) << 32) |
@@ -123,7 +123,7 @@ dsf_read_metadata(Decoder *decoder, InputStream &is,
/* read the 'fmt ' chunk of the DSF file */
DsfFmtChunk dsf_fmt_chunk;
if (!dsdlib_read(decoder, is, &dsf_fmt_chunk, sizeof(dsf_fmt_chunk)) ||
- !dsdlib_id_equals(&dsf_fmt_chunk.id, "fmt "))
+ !dsf_fmt_chunk.id.Equals("fmt "))
return false;
uint64_t fmt_chunk_size;
@@ -152,7 +152,7 @@ dsf_read_metadata(Decoder *decoder, InputStream &is,
/* read the 'data' chunk of the DSF file */
DsfDataChunk data_chunk;
if (!dsdlib_read(decoder, is, &data_chunk, sizeof(data_chunk)) ||
- !dsdlib_id_equals(&data_chunk.id, "data"))
+ !data_chunk.id.Equals("data"))
return false;
/* data size of DSF files are padded to multiple of 4096,