Swift native implementation of a FLAC reader.
- Full FLAC file & all subframe types parsing.
- Extract PCM data from verbatim-encoded (uncompressed) FLAC files.
- Convert verbatim-encoded (uncompressed) FLAC files to AIFF.
- Understand parsed subframe contents.
- Convert any FLAC file to AIFF.
- Optimized by using customized data containers.
let url = URL(fileURLWithPath: "file.flac")
// Creates a document using the given URL.
let container = try FLACContainer(at: url)
// Inspect the container using [DetailedDescription](https://github.com/Vaida12345/DetailedDescription)
detailedPrint(container)
// Inspect the metadata
detailedPrint(container.metadata)
// Gets interleaved audio data
let data = container.interleavedAudioData()
// Write the document as aiff
try container.write(to: .desktopDirectory.appending(path: "file.aiff"))
Swift-FLAC
uses Swift Package Manager as its build tool. If you want to import in your own project, it's as simple as adding a dependencies
clause to your Package.swift
:
dependencies: [
.package(url: "https://github.com/Vaida12345/Swift-FLAC.git", from: "1.0.2")
]
and then adding the appropriate module to your target dependencies.
You can add this framework as a dependency to your Xcode project by clicking File -> Swift Packages -> Add Package Dependency. The package is located at:
https://github.com/Vaida12345/Swift-FLAC
This package uses DocC for documentation. View on Github Pages