Merge pull request #27 from EMCP/master

getting a warning when executing regarding abs()
This commit is contained in:
Spencer Russell 2018-08-10 13:35:16 -04:00 committed by GitHub
commit ca7c8b91d8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View file

@ -9,7 +9,7 @@ function micmeter(metersize)
println("Press Ctrl-C to quit")
while true
block = read(mic, 512)
blockmax = maximum(abs(block)) # find the maximum value in the block
blockmax = maximum(abs.(block)) # find the maximum value in the block
signalmax = max(signalmax, blockmax) # keep the maximum value ever
print("\r") # reset the cursor to the beginning of the line
printmeter(metersize, blockmax, signalmax)

View file

@ -14,7 +14,7 @@ const fs = Float32[float(f) for f in domain(fft(buf)[fmin..fmax])]
while true
read!(stream, buf)
plot(fs, abs(fft(buf)[fmin..fmax]), xlim=(fs[1],fs[end]), ylim=(0,100))
plot(fs, abs.(fft(buf)[fmin..fmax]), xlim=(fs[1],fs[end]), ylim=(0,100))
end
end