Skip to content

Commit

Permalink
core/audio: Remove the now unused clip_frame parameter of start_stream
Browse files Browse the repository at this point in the history
  • Loading branch information
torokati44 committed Nov 26, 2023
1 parent 8ce95d7 commit 941f87c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
6 changes: 1 addition & 5 deletions core/src/backend/audio.rs
Original file line number Diff line number Diff line change
Expand Up @@ -98,11 +98,8 @@ pub trait AudioBackend: Downcast {

/// Starts playing a "stream" sound, which is an audio stream that is distributed
/// among the frames of a Flash MovieClip.
///
/// NOTE: `clip_frame` is no longer used on any backend.
fn start_stream(
&mut self,
clip_frame: u16,
clip_data: crate::tag_utils::SwfSlice,
handle: &swf::SoundStreamHead,
) -> Result<SoundInstanceHandle, DecodeError>;
Expand Down Expand Up @@ -267,7 +264,6 @@ impl AudioBackend for NullAudioBackend {

fn start_stream(
&mut self,
_clip_frame: u16,
_clip_data: crate::tag_utils::SwfSlice,
_handle: &swf::SoundStreamHead,
) -> Result<SoundInstanceHandle, DecodeError> {
Expand Down Expand Up @@ -536,7 +532,7 @@ impl<'gc> AudioManager<'gc> {
stream_info: &swf::SoundStreamHead,
) -> Option<SoundInstanceHandle> {
if self.sounds.len() < Self::MAX_SOUNDS {
let handle = audio.start_stream(clip_frame, data, stream_info).ok()?;
let handle = audio.start_stream(data, stream_info).ok()?;
let instance = SoundInstance {
sound: None,
instance: handle,
Expand Down
4 changes: 1 addition & 3 deletions core/src/backend/audio/mixer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -554,7 +554,6 @@ impl AudioMixer {
/// Starts a timeline audio stream.
pub fn start_stream(
&mut self,
_clip_frame: u16,
clip_data: SwfSlice,
stream_info: &swf::SoundStreamHead,
) -> Result<SoundInstanceHandle, DecodeError> {
Expand Down Expand Up @@ -1089,11 +1088,10 @@ macro_rules! impl_audio_mixer_backend {
#[inline]
fn start_stream(
&mut self,
clip_frame: u16,
clip_data: $crate::tag_utils::SwfSlice,
stream_info: &swf::SoundStreamHead,
) -> Result<SoundInstanceHandle, DecodeError> {
self.$mixer.start_stream(clip_frame, clip_data, stream_info)
self.$mixer.start_stream(clip_data, stream_info)
}

#[inline]
Expand Down

0 comments on commit 941f87c

Please sign in to comment.