Skip to content

Commit

Permalink
Use 32bit integer to enforce byte alignment
Browse files Browse the repository at this point in the history
Previously, 0xfffffe was used to discard the 1-bit while seeking through
a wav source. This causes issues for files with very large data chunks.
  • Loading branch information
wro-ableton committed Sep 12, 2023
1 parent 95262f7 commit ce55a3a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion audiostream/src/ni/media/audio/wav/wav_source.h
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ auto readWavHeader( Source& src )
}
}

src.seek( ( currentOffset + riffTag.length + 1 ) & 0xfffffe, std::ios_base::beg );
src.seek( ( currentOffset + riffTag.length + 1 ) & 0xfffffffe, std::ios_base::beg );
}

throw std::runtime_error( "Could not read \'data\' tag." );
Expand Down

0 comments on commit ce55a3a

Please sign in to comment.