Skip to content

Commit

Permalink
Convert sample rate to Float32
Browse files Browse the repository at this point in the history
Issue #26
  • Loading branch information
dancasimiro committed Jun 12, 2015
1 parent c11683a commit ff0542e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/WAV.jl
Original file line number Diff line number Diff line change
Expand Up @@ -627,7 +627,7 @@ function wavread(io::IO; subrange=None, format="double")
chunk_size = read_header(io)
samples = Array(Float64)
nbits = 0
sample_rate = 0
sample_rate = Float32(0.0)
opt = Dict{Symbol, Any}()

# Note: This assumes that the format chunk is written in the file before the data chunk. The
Expand All @@ -650,7 +650,7 @@ function wavread(io::IO; subrange=None, format="double")
# check the subchunk ID
if subchunk_id == b"fmt "
fmt = read_format(io, subchunk_size)
sample_rate = fmt.sample_rate
sample_rate = Float32(fmt.sample_rate)
nbits = bits_per_sample(fmt)
opt[:fmt] = fmt
elseif subchunk_id == b"data"
Expand Down

0 comments on commit ff0542e

Please sign in to comment.