work with vector buffers (#109)
* work with vector buffers * no redundant tests
This commit is contained in:
parent
9c701415c0
commit
78a0a9918d
2 changed files with 5 additions and 4 deletions
2
.github/workflows/Tests.yml
vendored
2
.github/workflows/Tests.yml
vendored
|
@ -18,8 +18,6 @@ jobs:
|
||||||
matrix:
|
matrix:
|
||||||
version:
|
version:
|
||||||
- '1.3'
|
- '1.3'
|
||||||
- '1.4'
|
|
||||||
- '1.5'
|
|
||||||
- '1'
|
- '1'
|
||||||
- 'nightly'
|
- 'nightly'
|
||||||
os:
|
os:
|
||||||
|
|
|
@ -1005,6 +1005,9 @@ function exchange(messenger, arguments...)
|
||||||
take!(messenger.output_channel)
|
take!(messenger.output_channel)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
as_matrix(matrix::Matrix) = matrix
|
||||||
|
as_matrix(vector::Vector) = reshape(vector, length(vector), 1)
|
||||||
|
|
||||||
# these will only work with sampledsignals scribes
|
# these will only work with sampledsignals scribes
|
||||||
function unsafe_write(
|
function unsafe_write(
|
||||||
sink::PortAudioSink{<:Messenger{<:Any, <:SampledSignalsWriter}},
|
sink::PortAudioSink{<:Messenger{<:Any, <:SampledSignalsWriter}},
|
||||||
|
@ -1012,7 +1015,7 @@ function unsafe_write(
|
||||||
already,
|
already,
|
||||||
frame_count,
|
frame_count,
|
||||||
)
|
)
|
||||||
exchange(sink.stream.sink_messanger, julia_buffer, already, frame_count)
|
exchange(sink.stream.sink_messanger, as_matrix(julia_buffer), already, frame_count)
|
||||||
end
|
end
|
||||||
|
|
||||||
function unsafe_read!(
|
function unsafe_read!(
|
||||||
|
@ -1021,7 +1024,7 @@ function unsafe_read!(
|
||||||
already,
|
already,
|
||||||
frame_count,
|
frame_count,
|
||||||
)
|
)
|
||||||
exchange(source.stream.source_messanger, julia_buffer, already, frame_count)
|
exchange(source.stream.source_messanger, as_matrix(julia_buffer), already, frame_count)
|
||||||
end
|
end
|
||||||
|
|
||||||
end # module PortAudio
|
end # module PortAudio
|
||||||
|
|
Loading…
Reference in a new issue