"scrubbing" sound: playing sound from views rather than Arrays

In PortAudio, audio data is just a Nx1 (mono) or Nx2 (stereo) matrix with an associated sample rate. So if you had a sample rate of 44_100 samples per second, a one-second-long audio will have 44_100 rows.

Say I have two 1-second-long sounds (of same sample rate). They are unrelated sounds and are not meant to be played in order. I was thinking that, rather than storing them in two different matrices, I could store them in one matrix (contiguous in memory) and read views from them-- essentially accessing certain segments of the matrix. So if I wanted to play the first bit of sound, I could pass the view of the first 41_000 rows to PortAudio. But this doesn’t seem possible currently. If I pass a view instead of a Matrix, I get:

ERROR: MethodError: no method matching write(::PortAudio.PortAudioSink{…}, ::SubArray{…})

I don’t know if this is a limitation of PortAudio and can be tweaked with there (or by me after import) or if this is a limitation of Base.write or some C liberary PortAudio is using under the hood.