Skip to content

Commit

Permalink
remove dead code
Browse files Browse the repository at this point in the history
  • Loading branch information
tazz4843 committed Jan 20, 2023
1 parent f73698c commit d35ac9d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 30 deletions.
15 changes: 2 additions & 13 deletions scripty_audio_handler/src/audio_handler.rs
Expand Up @@ -12,22 +12,16 @@ use songbird::{Event, EventContext, EventHandler};

use crate::events::*;
use crate::types::{
ActiveUserSet, NextUserList, SsrcIgnoredMap, SsrcLastPktIdMap, SsrcMissedPktList,
SsrcMissedPktMap, SsrcOutOfOrderPktCountMap, SsrcSilentFrameCountMap, SsrcSpeakingSet,
SsrcStreamMap, SsrcUserDataMap, SsrcUserIdMap, SsrcVoiceIngestMap,
ActiveUserSet, NextUserList, SsrcIgnoredMap, SsrcSpeakingSet, SsrcStreamMap, SsrcUserDataMap,
SsrcUserIdMap, SsrcVoiceIngestMap,
};

pub struct SsrcMaps {
pub ssrc_user_id_map: SsrcUserIdMap,
pub ssrc_stream_map: SsrcStreamMap,
pub ssrc_user_data_map: SsrcUserDataMap,
pub ssrc_ignored_map: SsrcIgnoredMap,
pub ssrc_last_pkt_id_map: SsrcLastPktIdMap,
pub ssrc_missed_pkt_map: SsrcMissedPktMap,
pub ssrc_missed_pkt_list: SsrcMissedPktList,
pub ssrc_voice_ingest_map: SsrcVoiceIngestMap,
pub ssrc_silent_frame_count_map: SsrcSilentFrameCountMap,
pub ssrc_out_of_order_pkt_count_map: SsrcOutOfOrderPktCountMap,
pub ssrc_speaking_set: SsrcSpeakingSet,
pub active_user_set: ActiveUserSet,
pub next_user_list: NextUserList,
Expand Down Expand Up @@ -60,12 +54,7 @@ impl AudioHandler {
ssrc_stream_map: DashMap::with_hasher(RandomState::new()),
ssrc_user_data_map: DashMap::with_hasher(RandomState::new()),
ssrc_ignored_map: DashMap::with_hasher(RandomState::new()),
ssrc_last_pkt_id_map: DashMap::with_hasher(RandomState::new()),
ssrc_missed_pkt_map: DashMap::with_hasher(RandomState::new()),
ssrc_missed_pkt_list: DashMap::with_hasher(RandomState::new()),
ssrc_voice_ingest_map: DashMap::with_hasher(RandomState::new()),
ssrc_silent_frame_count_map: DashMap::with_hasher(RandomState::new()),
ssrc_out_of_order_pkt_count_map: DashMap::with_hasher(RandomState::new()),
ssrc_speaking_set: DashSet::with_hasher(RandomState::new()),
active_user_set: DashSet::with_hasher(RandomState::new()),
next_user_list: RwLock::new(VecDeque::with_capacity(10)),
Expand Down
17 changes: 0 additions & 17 deletions scripty_audio_handler/src/types.rs
Expand Up @@ -19,29 +19,12 @@ pub type SsrcStreamMap = DashMap<u32, Stream, RandomState>;
/// Field 1 of the internal tuple is the user's avatar URL
pub type SsrcUserDataMap = DashMap<u32, (String, String), RandomState>;

/// Type alias for a `DashMap` containing SSRCs and out-of-order packet IDs
/// mapped to their audio packet data.
pub type SsrcMissedPktMap = DashMap<(u32, u16), Vec<i16>, RandomState>;

/// Type alias for a `DashMap` containing SSRCs mapped to a `Vec` of
/// audio packet IDs that were received out-of-order.
pub type SsrcMissedPktList = DashMap<u32, Vec<u16>, RandomState>;

/// Type alias for a `DashMap` containing SSRCs mapped to whether they should be ignored
pub type SsrcIgnoredMap = DashMap<u32, bool, RandomState>;

/// Type alias for a `DashMap` containing SSRCs mapped to the sequence ID of the last packet received
pub type SsrcLastPktIdMap = DashMap<u32, u16, RandomState>;

/// Type alias for a `DashMap` containing SSRCs mapped to a voice audio ingest struct.
pub type SsrcVoiceIngestMap = DashMap<u32, Option<VoiceIngest>, RandomState>;

/// Type alias for a `DashMap` containing SSRCs mapped to the number of silent frames in a row found.
pub type SsrcSilentFrameCountMap = DashMap<u32, usize, RandomState>;

/// Type alias for a `DashMap` containing SSRCs mapped to the number of out of order packets in a row.
pub type SsrcOutOfOrderPktCountMap = DashMap<u32, usize, RandomState>;

/// Type alias for a `DashSet` containing the SSRCs that were speaking this tick.
pub type SsrcSpeakingSet = DashSet<u32, RandomState>;

Expand Down

0 comments on commit d35ac9d

Please sign in to comment.