diff --git a/lib/wavefile/chunk_readers/format_chunk_reader.rb b/lib/wavefile/chunk_readers/format_chunk_reader.rb index 5ac3fe7..de40231 100644 --- a/lib/wavefile/chunk_readers/format_chunk_reader.rb +++ b/lib/wavefile/chunk_readers/format_chunk_reader.rb @@ -35,7 +35,7 @@ def read if format_chunk[:audio_format] == FORMAT_CODES[:extensible] if format_chunk[:extension_size] < 22 - raise_error InvalidFormatError, "The format chunk extension size of #{format_chunk[:extension_size]} bytes is too small. Since this format chunk has a format code of #{FORMAT_CODES[:extensible]}, the extension must be at least 22 bytes long." + raise_error InvalidFormatError, "The format chunk extension size of #{format_chunk[:extension_size]} bytes is too small. Since the format chunk has a format code of #{FORMAT_CODES[:extensible]} (i.e. WAVE_FORMAT_EXTENSIBLE), the extension size must be at least 22 bytes." end format_chunk[:valid_bits_per_sample] = raw_bytes.slice!(0...2).unpack(UNSIGNED_INT_16).first