Skip to content

Commit 4f07fb8

Browse files
committed
AudioBufferSource: Revert public API changes
1 parent fde9707 commit 4f07fb8

File tree

1 file changed

+1
-13
lines changed

1 file changed

+1
-13
lines changed

src/node/audio_buffer_source.rs

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ struct PlaybackInfo {
4949
}
5050

5151
#[derive(Debug, Clone)]
52-
pub struct LoopState {
52+
struct LoopState {
5353
pub is_looping: bool,
5454
pub start: f64,
5555
pub end: f64,
@@ -63,7 +63,6 @@ enum ControlMessage {
6363
Loop(bool),
6464
LoopStart(f64),
6565
LoopEnd(f64),
66-
LoopState(LoopState),
6766
}
6867

6968
/// `AudioBufferSourceNode` represents an audio source that consists of an
@@ -286,16 +285,6 @@ impl AudioBufferSourceNode {
286285
&self.detune
287286
}
288287

289-
pub fn loop_state(&self) -> &LoopState {
290-
&self.loop_state
291-
}
292-
293-
pub fn set_loop_state(&mut self, value: LoopState) {
294-
self.loop_state = value.clone();
295-
self.registration
296-
.post_message(ControlMessage::LoopState(value));
297-
}
298-
299288
/// Defines if the playback the [`AudioBuffer`] should be looped
300289
pub fn loop_(&self) -> bool {
301290
self.loop_state.is_looping
@@ -374,7 +363,6 @@ impl AudioBufferSourceRenderer {
374363
ControlMessage::Loop(is_looping) => self.loop_state.is_looping = *is_looping,
375364
ControlMessage::LoopStart(loop_start) => self.loop_state.start = *loop_start,
376365
ControlMessage::LoopEnd(loop_end) => self.loop_state.end = *loop_end,
377-
ControlMessage::LoopState(loop_state) => self.loop_state = loop_state.clone(),
378366
}
379367
}
380368
}

0 commit comments

Comments
 (0)