Skip to content

Commit 3c28a4d

Browse files
authored
Update for Julia 1.3+, use JLL packages and whatnot (#7)
Update for Julia 1.3+, use JLL packages and whatnot
2 parents c2cd769 + 46da526 commit 3c28a4d

File tree

9 files changed

+118
-89
lines changed

9 files changed

+118
-89
lines changed

.travis.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,10 @@ language: julia
33
os:
44
- linux
55
- osx
6+
- windows
67
julia:
7-
1.0
8+
- 1.3
9+
- nightly
810
notifications:
911
email: false
1012
# uncomment the following lines to override the default test script

Manifest.toml

Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
# This file is machine-generated - editing it directly is not advised
2+
3+
[[Base64]]
4+
uuid = "2a0f44e3-6c83-55bd-87e4-b1978d98bd5f"
5+
6+
[[Dates]]
7+
deps = ["Printf"]
8+
uuid = "ade2ca70-3891-5945-98fb-dc099432e06a"
9+
10+
[[Distributed]]
11+
deps = ["Random", "Serialization", "Sockets"]
12+
uuid = "8ba89e20-285c-5b6f-9357-94700520ee1b"
13+
14+
[[FileIO]]
15+
deps = ["Pkg"]
16+
git-tree-sha1 = "80c17c711c41416eb0ac68347dc036be68b37682"
17+
uuid = "5789e2e9-d7fb-5bc7-8068-2c6fae9b9549"
18+
version = "1.2.0"
19+
20+
[[InteractiveUtils]]
21+
deps = ["Markdown"]
22+
uuid = "b77e0a4c-d291-57a0-90e8-8db25a27a240"
23+
24+
[[LibGit2]]
25+
uuid = "76f85450-5226-5b5a-8eaa-529ad045b433"
26+
27+
[[Libdl]]
28+
uuid = "8f399da3-3557-5675-b5ff-fb832c97cbdb"
29+
30+
[[Logging]]
31+
uuid = "56ddb016-857b-54e1-b83d-db4d58db5568"
32+
33+
[[Markdown]]
34+
deps = ["Base64"]
35+
uuid = "d6f4376e-aef5-505a-96c1-9c027394607a"
36+
37+
[[Ogg]]
38+
deps = ["FileIO", "Ogg_jll", "Test"]
39+
git-tree-sha1 = "115de1bcae81dd83f2f1578439d7bc4192993d72"
40+
uuid = "796d8c31-69d0-5366-9081-a3bf997f4f0d"
41+
version = "1.0.0"
42+
43+
[[Ogg_jll]]
44+
deps = ["Libdl", "Pkg"]
45+
git-tree-sha1 = "f4d4d03c562f40652c0baabd3e4cb2e756e157b7"
46+
uuid = "e7412a2a-1a6e-54c0-be00-318e2571c051"
47+
version = "1.3.3+0"
48+
49+
[[Opus_jll]]
50+
deps = ["Libdl", "Pkg"]
51+
git-tree-sha1 = "c9931bf2fcdb57b48c227395c61ea82603212f7d"
52+
uuid = "91d4177d-7536-5919-b921-800302f37372"
53+
version = "1.3.1+0"
54+
55+
[[Pkg]]
56+
deps = ["Dates", "LibGit2", "Libdl", "Logging", "Markdown", "Printf", "REPL", "Random", "SHA", "UUIDs"]
57+
uuid = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f"
58+
59+
[[Printf]]
60+
deps = ["Unicode"]
61+
uuid = "de0858da-6303-5e67-8744-51eddeeeb8d7"
62+
63+
[[REPL]]
64+
deps = ["InteractiveUtils", "Markdown", "Sockets"]
65+
uuid = "3fa0cd96-eef1-5676-8a61-b3b8758bbffb"
66+
67+
[[Random]]
68+
deps = ["Serialization"]
69+
uuid = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
70+
71+
[[SHA]]
72+
uuid = "ea8e919c-243c-51af-8825-aaa63cd721ce"
73+
74+
[[Serialization]]
75+
uuid = "9e88b42a-f829-5b0c-bbe9-9e923198166b"
76+
77+
[[Sockets]]
78+
uuid = "6462fe0b-24de-5631-8697-dd941f90decc"
79+
80+
[[Test]]
81+
deps = ["Distributed", "InteractiveUtils", "Logging", "Random"]
82+
uuid = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
83+
84+
[[UUIDs]]
85+
deps = ["Random", "SHA"]
86+
uuid = "cf7118a7-6976-5b1a-9a39-7adc72f591a4"
87+
88+
[[Unicode]]
89+
uuid = "4ec0a83e-493e-50e2-b9ac-8f72acf5a8f5"

Project.toml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name = "Opus"
2+
uuid = "0af1e411-0638-4d6d-bb05-ed1900b440d5"
3+
version = "1.0.0"
4+
5+
[deps]
6+
FileIO = "5789e2e9-d7fb-5bc7-8068-2c6fae9b9549"
7+
Ogg = "796d8c31-69d0-5366-9081-a3bf997f4f0d"
8+
Opus_jll = "91d4177d-7536-5919-b921-800302f37372"
9+
10+
[compat]
11+
FileIO = "1.1"
12+
Ogg = "1.0"
13+
Opus_jll = "1.3.1"
14+
julia = "1.3"
15+
16+
[extras]
17+
DSP = "717857b8-e6f2-59f4-9121-6e50c889abd2"
18+
FFTW = "7a1cc6ca-52ef-59f5-83cd-3a7055c09341"
19+
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
20+
21+
[targets]
22+
test = ["Test", "DSP", "FFTW"]

REQUIRE

Lines changed: 0 additions & 6 deletions
This file was deleted.

appveyor.yml

Lines changed: 0 additions & 33 deletions
This file was deleted.

deps/build.jl

Lines changed: 0 additions & 30 deletions
This file was deleted.

src/Opus.jl

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,10 @@
1-
__precompile__()
21
module Opus
3-
using Compat
4-
using Ogg
2+
using Ogg, Opus_jll
53
using FileIO
64
import Base: convert, show, write
75

86
export OpusDecoder, OpusEncoder, OpusArray, load, save
97

10-
const depfile = joinpath(dirname(@__FILE__), "..", "deps", "deps.jl")
11-
if isfile(depfile)
12-
include(depfile)
13-
else
14-
error("libopus not properly installed. Please run Pkg.build(\"Opus\")")
15-
end
16-
17-
188
include("defines.jl")
199
include("decoder.jl")
2010
include("encoder.jl")

src/encoder.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ function save(output::Union{File{format"OPUS"},AbstractString,IO}, audio::Array{
9090
insert!(packets, 1, opus_head)
9191
opus_tags = OpusTags()
9292
insert!(packets, 2, opus_tags)
93-
Ogg.save(output, packets, granulepos)
93+
Ogg.save(output, Dict(Clong(1) => packets), Dict(Clong(1) => Int64.(granulepos)))
9494
end
9595

9696
function save(output::Union{File{format"OPUS"},AbstractString,IO}, audio::Array, fs; chunksize=960)

test/runtests.jl

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,4 @@
1-
using Compat
2-
using Compat.Test
3-
using Opus
4-
using Ogg
5-
using DSP
6-
using FFTW
1+
using Test, Opus, Ogg, DSP, FFTW
72

83
testdir = dirname(@__FILE__)
94

@@ -28,7 +23,7 @@ filtered_noise = filt([0.018, 0.054, 0.054, 0.018], [1.0, -1.760, 1.182, -0.278]
2823
# Each signal is harder for Opus to model, so increase the error bounds for each one
2924
@test avg_roundtrip_error(sin_signal) < .01
3025
@test avg_roundtrip_error(harmonic_signal) < .02
31-
@test avg_roundtrip_error(filtered_noise) < .1
26+
@test avg_roundtrip_error(filtered_noise) < .3
3227

3328

3429
# Now perform some tests to ensure that we can decode some Ogg Opus files

0 commit comments

Comments
 (0)