@@ -104,12 +104,15 @@ def get_playback_status(self) -> PlaybackStatus:
104104 return PlaybackStatus .STOPPED
105105
106106 status = bass .BASS_ChannelIsActive (self .current_channel )
107- if status == PlaybackStatus .PLAYING .value or status == PlaybackStatus .FIRST_PLAYING .value :
108- return PlaybackStatus .PLAYING
109- elif status == PlaybackStatus .PAUSED .value :
110- return PlaybackStatus .PAUSED
111- else :
112- return PlaybackStatus .STOPPED
107+ match status :
108+ case PlaybackStatus .PLAYING .value :
109+ return PlaybackStatus .PLAYING
110+ case PlaybackStatus .PAUSED .value :
111+ return PlaybackStatus .PAUSED
112+ case PlaybackStatus .STALLED .value :
113+ return PlaybackStatus .STALLED
114+ case other :
115+ return PlaybackStatus .STOPPED
113116
114117 def is_playing (self ) -> bool :
115118 """Checks if the audio is currently playing."""
@@ -119,7 +122,11 @@ def is_paused(self) -> bool:
119122 """Checks if the audio is currently paused."""
120123 return self .get_playback_status () == PlaybackStatus .PAUSED
121124
125+ def is_stalled (self ) -> bool :
126+ """Checks if the channel is activ but stalled waiting for more data"""
127+ return self .get_playback_status () == PlaybackStatus .STALLED
128+
122129 def is_stopped (self ) -> bool :
123130 """Checks if the audio is currently stopped."""
124- return self .get_playback_status () == PlaybackStatus .STOPPED
131+ return self .get_playback_status () == PlaybackStatus .STOPPED
125132
0 commit comments