SwiftyALSA is a Swift package library that acts as a seamless and efficient wrapper around the ALSA (Advanced Linux Sound Architecture) library. It enables Swift developers to conveniently integrate audio functionality in their Linux-based applications by tapping into the power of ALSA.
-
Sound Playback & Recording: SwiftyALSA allows developers to integrate sound playback and recording functionalities into their applications, supporting various audio formats.
-
Hardware Configuration: The library provides access to ALSA's hardware-level controls, allowing configuration of sound cards and other audio devices.
-
Intuitive Error Handling: SwiftALSA translates ALSA's error codes into Swift-friendly error objects, simplifying the process of error handling for developers.
SwiftALSA is regularly updated to ensure compatibility with the most recent versions of Swift and ALSA. It is an open-source project and welcomes contributions from the Swift and ALSA developer communities.
NOTE: Utilizing SwiftALSA requires a basic understanding of ALSA's concepts and architecture, as it's essentially a Swift interface to the underlying ALSA library.
Xcode installation is not officialy supported, as this library is for linux only.
You can add SwiftyALSA
as a package dependency in your Package.swift
file:
let package = Package(
//...
dependencies: [
.package(
url: "https://github.com/Vaidios/SwiftyALSA.git",
branch: "master"
),
],
//...
)
From there, refer to the ALSA
"product" delivered by the SwiftyALSA
"package" inside of any of your project's target dependencies:
targets: [
.target(
name: "YourLibrary",
dependencies: [
.product(
name: "ALSA",
package: "SwiftyALSA"
),
],
...
),
...
]
Then simply import ALSA
wherever you’d like to use it.
- Extending available ALSA API's, contributions are very welcome!
- Swift 5.8
SwiftyALSA
is available under the MIT license. See the LICENSE file for more info.