MCPcopy Create free account
hub / github.com/Moosync/Moosync / stop_playback

Method stop_playback

src/components/audiostream.rs:137–146  ·  view source on GitHub ↗
(&self)

Source from the content-addressed store, hash-verified

135
136 #[tracing::instrument(level = "debug", skip(self))]
137 pub async fn stop_playback(&self) -> Result<()> {
138 let active_player = self.active_player.load(Ordering::Relaxed);
139 let mut players = self.players.lock().await;
140 self.listeners_active.store(false, Ordering::Relaxed);
141 if let Some(player) = players.get_mut(active_player) {
142 player.stop()?;
143 }
144
145 Ok(())
146 }
147
148 #[tracing::instrument(level = "debug", skip(self, player_store, song))]
149 pub async fn get_player(

Callers 2

load_audioMethod · 0.80
AudioStreamFunction · 0.80

Calls 2

loadMethod · 0.45
stopMethod · 0.45

Tested by

no test coverage detected