Skip to content

Commit 7c2e6d0

Browse files
committed
AudioBufferSourceNode: mark LoopState Copy
1 parent 37b38d2 commit 7c2e6d0

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/node/audio_buffer_source.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ struct PlaybackInfo {
5555
k: f32,
5656
}
5757

58-
#[derive(Debug, Clone)]
58+
#[derive(Debug, Clone, Copy)]
5959
struct LoopState {
6060
pub is_looping: bool,
6161
pub start: f64,
@@ -214,7 +214,7 @@ impl AudioBufferSourceNode {
214214
buffer: None,
215215
detune: d_proc,
216216
playback_rate: pr_proc,
217-
loop_state: loop_state.clone(),
217+
loop_state,
218218
render_state: AudioBufferRendererState::default(),
219219
ended_triggered: false,
220220
};
@@ -423,7 +423,7 @@ impl AudioProcessor for AudioBufferSourceRenderer {
423423
is_looping,
424424
start: loop_start,
425425
end: loop_end,
426-
} = self.loop_state.clone();
426+
} = self.loop_state;
427427

428428
// these will only be used if `loop_` is true, so no need for `Option`
429429
let mut actual_loop_start = 0.;

0 commit comments

Comments
 (0)