avoid fields with abstract types (#100)

https://docs.julialang.org/en/v1/manual/performance-tips/#Avoid-fields-with-abstract-type

The Buffer contains a field which is of type Array{T} where T. This is an abstract type, and to make it concrete, we need to specify the dimension of the array (2).
This commit is contained in:
Jeevith Gnanakumaran 2022-01-10 17:38:16 +00:00 committed by GitHub
parent d570288ebe
commit f6cd300ec8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -379,7 +379,7 @@ Use [`PortAudio.write_buffer`](@ref) to write data to PortAudio, and [`PortAudio
struct Buffer{Sample}
stream_lock::ReentrantLock
pointer_to::Ptr{PaStream}
data::Array{Sample}
data::Array{Sample, 2}
number_of_channels::Int
frames_per_buffer::Int
warn_xruns::Bool