diff --git a/include/bw64/chunks.hpp b/include/bw64/chunks.hpp index 544e9bd..3cc2bfc 100644 --- a/include/bw64/chunks.hpp +++ b/include/bw64/chunks.hpp @@ -125,7 +125,7 @@ namespace bw64 { formatTag_ = formatTag; channelCount_ = channels; sampleRate_ = sampleRate; - bitsPerSample_ = bitDepth; + bitsPerSample_ = (uint16_t) bitDepth; extraData_ = extraData; // validation diff --git a/include/bw64/parser.hpp b/include/bw64/parser.hpp index 94b82ed..bd99d26 100644 --- a/include/bw64/parser.hpp +++ b/include/bw64/parser.hpp @@ -214,11 +214,11 @@ namespace bw64 { std::map table; for (uint32_t i = 0; i < tableLength; ++i) { - uint32_t id; - uint64_t size; - utils::readValue(stream, id); - utils::readValue(stream, size); - table[id] = size; + uint32_t readID; + uint64_t readSize; + utils::readValue(stream, readID); + utils::readValue(stream, readSize); + table[readID] = readSize; } // skip junk data stream.seekg(size - minSize, std::ios::cur); diff --git a/include/bw64/reader.hpp b/include/bw64/reader.hpp index ad110c2..dbde1ab 100644 --- a/include/bw64/reader.hpp +++ b/include/bw64/reader.hpp @@ -218,7 +218,7 @@ namespace bw64 { /** * @brief Seek a frame position in the DataChunk */ - void seek(int32_t offset, std::ios_base::seekdir way = std::ios::beg) { + void seek(int64_t offset, std::ios_base::seekdir way = std::ios::beg) { auto numberOfFramesInt = utils::safeCast(numberOfFrames()); // where to seek relative to according to way