fix
This commit is contained in:
parent
4cf4bc8e7a
commit
98aede658a
2 changed files with 14 additions and 11 deletions
|
@ -320,10 +320,16 @@ end
|
|||
function show(io::IO, stream::PortAudioStream)
|
||||
println(io, typeof(stream))
|
||||
print(io, " Samplerate: ", samplerate(stream), "Hz")
|
||||
print(io, "\n ")
|
||||
show(io, stream.sink)
|
||||
print(io, "\n ")
|
||||
show(io, stream.source)
|
||||
sink = stream.sink
|
||||
if nchannels(sink) > 0
|
||||
print(io, "\n ")
|
||||
show(io, sink)
|
||||
end
|
||||
source = stream.source
|
||||
if nchannels(source) > 0
|
||||
print(io, "\n ")
|
||||
show(io, source)
|
||||
end
|
||||
end
|
||||
|
||||
#
|
||||
|
|
|
@ -72,12 +72,10 @@ if !isempty(PortAudio.devices())
|
|||
stream = PortAudioStream(2, 2)
|
||||
sink = stream.sink
|
||||
source = stream.source
|
||||
@test sprint(show, typeof(sink)) == "PortAudioSink{Float32}"
|
||||
@test sprint(show, typeof(source)) == "PortAudioSource{Float32}"
|
||||
@test sprint(show, sink) ==
|
||||
"2-channel PortAudioSink{Float32}($(repr(default_indev)))"
|
||||
"2 channel sink: $(repr(default_indev))"
|
||||
@test sprint(show, source) ==
|
||||
"2-channel PortAudioSource{Float32}($(repr(default_outdev)))"
|
||||
"2 channel source: $(repr(default_outdev))"
|
||||
write(stream, stream, 5s)
|
||||
recover_xrun(stream)
|
||||
@test_throws ErrorException("""
|
||||
|
@ -120,9 +118,8 @@ if !isempty(PortAudio.devices())
|
|||
"""
|
||||
PortAudioStream{Float32}
|
||||
Samplerate: 44100.0Hz
|
||||
|
||||
2 channel sink: "$default_outdev"
|
||||
2 channel source: "$default_indev\"""",
|
||||
2 channel sink: $(repr(default_outdev))
|
||||
2 channel source: $(repr(default_indev))""",
|
||||
String(take!(io)),
|
||||
)
|
||||
close(stream)
|
||||
|
|
Loading…
Add table
Reference in a new issue