Skip to content

Commit ffd1691

Browse files
committed
test: review test_resample_from_empty to use private from_channel constructor
1 parent 2bb0ae4 commit ffd1691

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

src/buffer.rs

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -733,12 +733,8 @@ mod tests {
733733

734734
#[test]
735735
fn test_resample_from_empty() {
736-
let options = AudioBufferOptions {
737-
number_of_channels: 1,
738-
length: 0,
739-
sample_rate: 48000.,
740-
};
741-
let mut buffer = AudioBuffer::new(options);
736+
let channel = ChannelData::from(vec![]);
737+
let mut buffer = AudioBuffer::from_channels(vec![channel], 48000.);
742738
buffer.resample(48000.);
743739

744740
assert_eq!(buffer.length(), 0);

0 commit comments

Comments
 (0)