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:
|
||||
version:
|
||||
- '1.3'
|
||||
- '1.4'
|
||||
- '1.5'
|
||||
- '1'
|
||||
- 'nightly'
|
||||
os:
|
||||
|
|
|
@ -1005,6 +1005,9 @@ function exchange(messenger, arguments...)
|
|||
take!(messenger.output_channel)
|
||||
end
|
||||
|
||||
as_matrix(matrix::Matrix) = matrix
|
||||
as_matrix(vector::Vector) = reshape(vector, length(vector), 1)
|
||||
|
||||
# these will only work with sampledsignals scribes
|
||||
function unsafe_write(
|
||||
sink::PortAudioSink{<:Messenger{<:Any, <:SampledSignalsWriter}},
|
||||
|
@ -1012,7 +1015,7 @@ function unsafe_write(
|
|||
already,
|
||||
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
|
||||
|
||||
function unsafe_read!(
|
||||
|
@ -1021,7 +1024,7 @@ function unsafe_read!(
|
|||
already,
|
||||
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 # module PortAudio
|
||||
|
|
Loading…
Reference in a new issue