Should discontiguous audio be valid? #1133
Labels
API change
Does this change the behavior of existing API?
discussion
Open-ended discussion for developers and users
Milestone
Since merging #1125 , we no longer have a strict requirement for the input to
util.frame
to be contiguous. A discontiguous buffer will be copied to a proper arrangement to support framing.Relatedly,
util.valid_audio
requires that the input buffer be F-contiguous to pass as valid. This requirement was originally put in to ensure that framing can operate smoothly if the audio buffer is valid.The question now is: should we relax the requirement in
valid_audio
?Why does this matter: if we want to make a multi-dimensional STFT, it will need to frame a multi-channel input:
(2, N) -> (2, NFFT, F)
. However, soundfile returns C-contiguous buffers, and the whole thing breaks. If we relax the requirement invalid_audio
, then the whole thing can proceed as expected, if not quite as efficiently as possible.Related issue: #1130
The text was updated successfully, but these errors were encountered: