A simple Swift library for playing sounds with minimal code, supporting loops, volume control, and callbacks.
SwiftySound is a Swift library designed to simplify audio playback in Apple ecosystem apps (iOS, tvOS, macOS). It provides a clean, minimal API to play sounds from files or URLs with features like looping, volume control, and callbacks, eliminating the need for low-level AVAudioSession boilerplate.
Swift developers building iOS, tvOS, or macOS apps who need to add sound effects, notifications, or background audio without dealing with complex audio frameworks.
Developers choose SwiftySound for its dead-simple API that reduces audio playback to a single line of code, while still offering essential features like loops, volume adjustment, and global controls—all wrapped in a lightweight, well-documented package.
SwiftySound is a simple library that lets you play sounds with a single line of code.
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Allows playing sounds from files or URLs with just one line of code, as shown with `Sound.play(file: "dog.wav")`, reducing boilerplate.
Supports playing sounds multiple times or infinitely with negative loop values, ideal for background audio or repeated effects.
Provides static methods like `Sound.stopAll()` and `Sound.enabled` with UserDefaults persistence for easy app-wide control.
Each Sound instance allows volume adjustment between 0.0 and 1.0 and includes callbacks for playback completion, enhancing customization.
Callbacks are not called if playback is stopped, interrupted, or errors occur, as noted in the warning, making error handling incomplete.
Sound category changes, like setting `.ambient`, are unavailable on macOS due to AVAudioSession architecture, limiting cross-platform consistency.
Lacks advanced audio capabilities such as effects, mixing, or streaming, focusing only on simple playback, which may require additional libraries for complex needs.