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:
parent
d570288ebe
commit
f6cd300ec8
1 changed files with 1 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue