Skip to content

Commit

Permalink
Merge 32db44b into 0999953
Browse files Browse the repository at this point in the history
  • Loading branch information
rdeits committed Aug 17, 2018
2 parents 0999953 + 32db44b commit 9cc2ada
Show file tree
Hide file tree
Showing 8 changed files with 36 additions and 36 deletions.
10 changes: 5 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ os:
- linux
- osx
julia:
- 0.6
- 1.0
- nightly
matrix:
allow_failures:
- julia: nightly
notifications:
email: false
script:
- if [[ -a .git/shallow ]]; then git fetch --unshallow; fi
- julia --check-bounds=yes -e 'Pkg.clone(pwd()); Pkg.build("WAV"); Pkg.test("WAV"; coverage=true)'
after_success:
- julia -e 'cd(Pkg.dir("WAV")); Pkg.add("Coverage"); using Coverage; Coveralls.submit(Coveralls.process_folder())'
- julia -e 'import Pkg; Pkg.add("Coverage"); using Coverage; Coveralls.submit(process_folder())'
1 change: 0 additions & 1 deletion REQUIRE
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
julia 1.0
FileIO 0.2.0
Compat 0.62
39 changes: 23 additions & 16 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,17 @@
environment:
matrix:
- JULIA_URL: "https://julialang-s3.julialang.org/bin/winnt/x86/0.6/julia-0.6-latest-win32.exe"
- JULIA_URL: "https://julialang-s3.julialang.org/bin/winnt/x64/0.6/julia-0.6-latest-win64.exe"
- JULIA_URL: "https://julialangnightlies-s3.julialang.org/bin/winnt/x86/julia-latest-win32.exe"
- JULIA_URL: "https://julialangnightlies-s3.julialang.org/bin/winnt/x64/julia-latest-win64.exe"
- julia_version: 1
- julia_version: nightly

platform:
- x86 # 32-bit
- x64 # 64-bit

# Uncomment the following lines to allow failures on nightly julia
# (tests will run but not make your overall status red)
matrix:
allow_failures:
- julia_version: nightly

branches:
only:
Expand All @@ -17,19 +25,18 @@ notifications:
on_build_status_changed: false

install:
- ps: "[System.Net.ServicePointManager]::SecurityProtocol = [System.Net.SecurityProtocolType]::Tls12"
# Download most recent Julia Windows binary
- ps: (new-object net.webclient).DownloadFile(
$env:JULIA_URL,
"C:\projects\julia-binary.exe")
# Run installer silently, output to C:\projects\julia
- C:\projects\julia-binary.exe /S /D=C:\projects\julia
- ps: iex ((new-object net.webclient).DownloadString("https://raw.githubusercontent.com/JuliaCI/Appveyor.jl/version-1/bin/install.ps1"))

build_script:
# Need to convert from shallow to complete for Pkg.clone to work
- IF EXIST .git\shallow (git fetch --unshallow)
- C:\projects\julia\bin\julia -e "versioninfo();
Pkg.clone(pwd(), \"WAV\"); Pkg.build(\"WAV\")"
- echo "%JL_BUILD_SCRIPT%"
- C:\julia\bin\julia -e "%JL_BUILD_SCRIPT%"

test_script:
- C:\projects\julia\bin\julia --check-bounds=yes -e "Pkg.test(\"WAV\")"
- echo "%JL_TEST_SCRIPT%"
- C:\julia\bin\julia -e "%JL_TEST_SCRIPT%"

# # Uncomment to support code coverage upload. Should only be enabled for packages
# # which would have coverage gaps without running on Windows
# on_success:
# - echo "%JL_CODECOV_SCRIPT%"
# - C:\julia\bin\julia -e "%JL_CODECOV_SCRIPT%"
2 changes: 1 addition & 1 deletion src/AudioDisplay.jl
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import Base.show
using Compat.Base64: base64encode
using Base64: base64encode

struct WAVArray{T,N}
Fs::Number
Expand Down
3 changes: 1 addition & 2 deletions src/WAV.jl
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@ export WAVChunk, WAVMarker, wav_cue_read, wav_cue_write, wav_info_write, wav_inf
export WAVArray, WAVFormatExtension, WAVFormat
export isextensible, isformat, bits_per_sample
export WAVE_FORMAT_PCM, WAVE_FORMAT_IEEE_FLOAT, WAVE_FORMAT_ALAW, WAVE_FORMAT_MULAW
using Compat: codeunits, findall, nothing, Nothing, undef
import Compat: Libdl
import Libdl
using FileIO

function __init__()
Expand Down
2 changes: 0 additions & 2 deletions src/wavplay-audioqueue.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
module WAVPlay
import ..wavplay

using Compat: Cvoid, undef

const OSStatus = Int32
const CFTypeRef = Ptr{Cvoid}
const CFRunLoopRef = Ptr{Cvoid}
Expand Down
3 changes: 1 addition & 2 deletions src/wavplay-pulse.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@
module WAVPlay
import ..wavplay

using Compat: Cvoid, undef
import Compat: Libdl
import Libdl

# typedef enum pa_sample_format
const PA_SAMPLE_U8 = 0 # Unsigned 8 Bit PCM
Expand Down
12 changes: 5 additions & 7 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
## Test suite for Julia's WAV module
import WAV
using Test
using Compat
using Compat: AbstractDisplay, findall, occursin, repr, String, undef

# These float array comparison functions are from dists.jl
function absdiff(current::AbstractArray{T}, target::AbstractArray{T}) where T <: Real
Expand Down Expand Up @@ -251,20 +249,20 @@ seek(io, 4)
chunk_size_old = WAV.read_le(io, UInt32)
seek(io, 40)
data_length_old = WAV.read_le(io, UInt32)
### Append second chunk to wav-file
### Append second chunk to wav-file
WAV.wavappend(
x1,
io)
seek(io, 4)
chunk_size_new = WAV.read_le(io, UInt32)
seek(io, 40)
data_length_new = WAV.read_le(io, UInt32)
### Compare data lengths.
### Compare data lengths.
data_length_old_in_samples =
round(Int32, data_length_old/(number_channels*number_bits)*8)
data_length_new_in_samples =
round(Int32, data_length_new/(number_channels*number_bits)*8)
@test data_length_new_in_samples == 3*data_length_old_in_samples
@test data_length_new_in_samples == 3*data_length_old_in_samples
@test (chunk_size_new-36) == 3*(chunk_size_old-36)

## Test native encoding of 8 bits
Expand Down Expand Up @@ -320,7 +318,7 @@ end

## Test encoding 32 bit values
for nchans = (1,2,4)
in_data_single = convert(Array{Float32}, reshape(Compat.range(-1.0, stop=1.0, length=128), trunc(Int, 128 / nchans), nchans))
in_data_single = convert(Array{Float32}, reshape(range(-1.0, stop=1.0, length=128), trunc(Int, 128 / nchans), nchans))
io = IOBuffer()
WAV.wavwrite(in_data_single, io)

Expand Down Expand Up @@ -355,7 +353,7 @@ end

## Test encoding 64 bit values
for nchans = (1,2,4)
in_data_single = convert(Array{Float64}, reshape(Compat.range(-1.0, stop=1.0, length=128), trunc(Int, 128 / nchans), nchans))
in_data_single = convert(Array{Float64}, reshape(range(-1.0, stop=1.0, length=128), trunc(Int, 128 / nchans), nchans))
io = IOBuffer()
WAV.wavwrite(in_data_single, io)

Expand Down

0 comments on commit 9cc2ada

Please sign in to comment.