             $1.pause()
         }
         
-        if isMuted {
-            avPlayer.volume = 0
-        }
-        
+        avPlayer.volume = isMuted ? 0 : currentVolume
         avPlayer.play()
     }
     

        set {
            UserDefaults.standard.set(newValue, forKey: mutedKey)
            allPlayers.forEach {
                $1.volume = newValue ? 0 : 1
            }
        }
    }

    }
    
    private var _currentlyPlaying: FileName = .none
    
    /// Current volume
    private var currentVolume: Float = 1.0
    
    /// All av audio players
    private var allPlayers = [String: AVAudioPlayer]()
