Skip to content

Commit 1e01907

Browse files
authored
Merge pull request #78 from yurivish/master
Fix some warnings & deprecations on 0.6
2 parents 0f92cdd + 6a3dfe3 commit 1e01907

8 files changed

+12
-12
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ for v in values(MIDI.GM) # GM is a map of all the general MIDI instrument names
7575
push!(notes, E)
7676
push!(notes, G)
7777
# This changes the instrument currently used
78-
MIDI.programchange(track, G.position + inc + inc, uint8(0), v)
78+
MIDI.programchange(track, G.position + inc + inc, UInt8(0), v)
7979
C.position += inc
8080
E.position += inc
8181
G.position += inc

REQUIRE

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
julia 0.5
1+
julia 0.6

src/miditrack.jl

+1-1
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ function writetrack(f::IO, track::MIDITrack)
9595
# Write the track end event
9696
writeevent(event_buffer, MetaEvent(0, METATRACKEND, UInt8[]))
9797

98-
bytes = takebuf_array(event_buffer)
98+
bytes = take!(event_buffer)
9999

100100
write(f, hton(UInt32(length(bytes))))
101101
write(f, bytes)

test/metaevent.jl

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
for (output, input) in validtestvalues
2323
buf = IOBuffer()
2424
MIDI.writeevent(buf, input)
25-
@test takebuf_array(buf) == output
25+
@test take!(buf) == output
2626
end
2727
end
2828

test/midievent.jl

+3-3
Original file line numberDiff line numberDiff line change
@@ -17,17 +17,17 @@
1717

1818
result = MIDI.readMIDIevent(Int64(input_no_status[1]), IOBuffer(input_no_status[2:length(input_no_status)]), status)
1919
@test result.dT == output.dT && result.data == output.data
20-
20+
2121
input, output = output, input
2222
output_no_status = input_no_status
2323

2424
buf = IOBuffer()
2525
MIDI.writeevent(buf, input, true)
26-
@test takebuf_array(buf) == output
26+
@test take!(buf) == output
2727

2828
buf = IOBuffer()
2929
MIDI.writeevent(buf, input, false)
30-
@test takebuf_array(buf) == output_no_status
30+
@test take!(buf) == output_no_status
3131
end
3232
end
3333
end

test/miditrack.jl

+3-3
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ invalidtestvalues = [
2929
for (output, input) in validtestvalues
3030
buf = IOBuffer()
3131
MIDI.writetrack(buf, input)
32-
@test takebuf_array(buf) == output
32+
@test take!(buf) == output
3333
end
3434
end
3535

@@ -64,9 +64,9 @@ invalidtestvalues = [
6464
@testset "it should allow notes and program change events to be written to a track" begin
6565
buf = IOBuffer()
6666
MIDI.writetrack(buf, track)
67-
@test takebuf_array(buf) == [0x4d, 0x54, 0x72, 0x6b, 0x00, 0x00, 0x00, 0x52, 0x60, 0x90, 0x3c, 0x7f, 0x30, 0x43, 0x7f, 0x30, 0x80, 0x3c, 0x7f, 0x00, 0x90, 0x40, 0x7f, 0x30, 0x80, 0x43, 0x7f, 0x30, 0xc0, 0x00, 0x00, 0x80, 0x40, 0x7f, 0x00, 0x90, 0x3c, 0x7f, 0x30, 0x43, 0x7f, 0x30, 0x80, 0x3c, 0x7f, 0x00, 0x90, 0x40, 0x7f, 0x30, 0x80, 0x43, 0x7f, 0x30, 0xc0, 0x01, 0x00, 0x80, 0x40, 0x7f, 0x00, 0x90, 0x3c, 0x7f, 0x30, 0x43, 0x7f, 0x30, 0x80, 0x3c, 0x7f, 0x00, 0x90, 0x40, 0x7f, 0x30, 0x80, 0x43, 0x7f, 0x30, 0xc0, 0x02, 0x00, 0x80, 0x40, 0x7f, 0x00, 0xff, 0x2f, 0x00]
67+
@test take!(buf) == [0x4d, 0x54, 0x72, 0x6b, 0x00, 0x00, 0x00, 0x52, 0x60, 0x90, 0x3c, 0x7f, 0x30, 0x43, 0x7f, 0x30, 0x80, 0x3c, 0x7f, 0x00, 0x90, 0x40, 0x7f, 0x30, 0x80, 0x43, 0x7f, 0x30, 0xc0, 0x00, 0x00, 0x80, 0x40, 0x7f, 0x00, 0x90, 0x3c, 0x7f, 0x30, 0x43, 0x7f, 0x30, 0x80, 0x3c, 0x7f, 0x00, 0x90, 0x40, 0x7f, 0x30, 0x80, 0x43, 0x7f, 0x30, 0xc0, 0x01, 0x00, 0x80, 0x40, 0x7f, 0x00, 0x90, 0x3c, 0x7f, 0x30, 0x43, 0x7f, 0x30, 0x80, 0x3c, 0x7f, 0x00, 0x90, 0x40, 0x7f, 0x30, 0x80, 0x43, 0x7f, 0x30, 0xc0, 0x02, 0x00, 0x80, 0x40, 0x7f, 0x00, 0xff, 0x2f, 0x00]
6868
end
69-
69+
7070
@testset "it should correctly get notes from a track" begin
7171
sort!(notes, lt=((x, y)->x.position<y.position))
7272
for (n1, n2) in zip(notes, MIDI.getnotes(track))

test/sysexevent.jl

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ end
2424
for (output, input) in validtestvalues
2525
buf = IOBuffer()
2626
MIDI.writeevent(buf, input)
27-
@test takebuf_array(buf) == output
27+
@test take!(buf) == output
2828
end
2929
end
3030

test/variablelength.jl

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ testvalues = [
1717
for (output, input) in testvalues
1818
buf = IOBuffer()
1919
MIDI.writevariablelength(buf, Int64(input))
20-
@test takebuf_array(buf) == output
20+
@test take!(buf) == output
2121
end
2222
end
2323
end

0 commit comments

Comments
 (0)