fixes 0.5 depwarns except AsyncCondition stuff
This commit is contained in:
parent
6433b6fb93
commit
e40933b97b
3 changed files with 12 additions and 6 deletions
|
@ -5,6 +5,8 @@ module PortAudio
|
|||
using SampledSignals
|
||||
using Devectorize
|
||||
using RingBuffers
|
||||
using Compat
|
||||
import Compat: UTF8String
|
||||
|
||||
# Get binary dependencies loaded from BinDeps
|
||||
include( "../deps/deps.jl")
|
||||
|
@ -42,8 +44,8 @@ type PortAudioDevice
|
|||
end
|
||||
|
||||
PortAudioDevice(info::PaDeviceInfo, idx) = PortAudioDevice(
|
||||
bytestring(info.name),
|
||||
bytestring(Pa_GetHostApiInfo(info.host_api).name),
|
||||
unsafe_string(info.name),
|
||||
unsafe_string(Pa_GetHostApiInfo(info.host_api).name),
|
||||
info.max_input_channels,
|
||||
info.max_output_channels,
|
||||
idx)
|
||||
|
@ -60,7 +62,7 @@ devnames() = join(["\"$(dev.name)\"" for dev in devices()], "\n")
|
|||
"""Give a pointer to the given field within a Julia object"""
|
||||
function fieldptr{T}(obj::T, field::Symbol)
|
||||
fieldnum = findfirst(fieldnames(T), field)
|
||||
offset = fieldoffsets(T)[fieldnum]
|
||||
offset = fieldoffset(T, fieldnum)
|
||||
FT = fieldtype(T, field)
|
||||
|
||||
Ptr{FT}(pointer_from_objref(obj) + offset)
|
||||
|
|
|
@ -57,7 +57,7 @@ Pa_GetVersion() = ccall((:Pa_GetVersion, libportaudio), Cint, ())
|
|||
|
||||
function Pa_GetVersionText()
|
||||
versionPtr = ccall((:Pa_GetVersionText, libportaudio), Ptr{Cchar}, ())
|
||||
bytestring(versionPtr)
|
||||
unsafe_string(versionPtr)
|
||||
end
|
||||
|
||||
# Host API Functions
|
||||
|
@ -69,7 +69,7 @@ end
|
|||
# all the host APIs on the system by iterating through those values.
|
||||
|
||||
# PaHostApiTypeId values
|
||||
const pa_host_api_names = Dict{PaHostApiTypeId, ASCIIString}(
|
||||
const pa_host_api_names = Dict{PaHostApiTypeId, UTF8String}(
|
||||
0 => "In Development", # use while developing support for a new host API
|
||||
1 => "Direct Sound",
|
||||
2 => "MME",
|
||||
|
|
|
@ -1,6 +1,10 @@
|
|||
#!/usr/bin/env julia
|
||||
|
||||
using BaseTestNext
|
||||
if VERSION >= v"0.5.0-dev+7720"
|
||||
using Base.Test
|
||||
else
|
||||
using BaseTestNext
|
||||
end
|
||||
using PortAudio
|
||||
using SampledSignals
|
||||
|
||||
|
|
Loading…
Reference in a new issue