Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion include/bw64/chunks.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ namespace bw64 {
formatTag_ = formatTag;
channelCount_ = channels;
sampleRate_ = sampleRate;
bitsPerSample_ = bitDepth;
bitsPerSample_ = (uint16_t) bitDepth;
extraData_ = extraData;

// validation
Expand Down
10 changes: 5 additions & 5 deletions include/bw64/parser.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -214,11 +214,11 @@ namespace bw64 {

std::map<uint32_t, uint64_t> 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);
Expand Down
2 changes: 1 addition & 1 deletion include/bw64/reader.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<int64_t>(numberOfFrames());

// where to seek relative to according to way
Expand Down