Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions Sources/Sound.swift
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,12 @@ open class Sound {
let sound = sounds[url]
sound?.stop()
}

/// Clear all cached sound -> close all opening audio file -> avoid Domain=NSOSStatusErrorDomain Code=-42 error.
public static func clearCache() {
stopAll()
sounds.removeAll()
}

/// Duration of the sound.
public var duration: TimeInterval {
Expand Down