Skip to content

arkasas/OggDecoder

Repository files navigation

OggDecoder

Convert ogg and oga files in Swifty way

swift-version License Platform SwiftPM compatible

Introduction

OggDecoder was created in order to convert a audio filed(ogg and oga) that are not playable by iOS AVFoundation into .wav file. It contant a two XCFramework based on liibogg(https://github.com/gcp/libogg) and vorbis(https://github.com/xiph/vorbis) framework.

Requirements

OggDecoder works on the following platforms:

  • iOS 13+
  • Mac OSX 10.14+

Installation

To use OggDecoder with Apple's Swift package manager, add the following as a dependency to your Package.swift:

.package(url: "https://github.com/arkasas/OggDecoder.git")

Usage

Ogg decoder is designed to made a ogg/oga files converting into wav as simple as possible. To do so you have to:

  1. Import OggDecoder
import OggDecoder
  1. Decode file
let decoder = OGGDecoder()
let oggFile = oggFileURL()
decoder.decode(oggFile) { (savedWavUrl: URL?) in
  // Do whatever you want with URL
  // If convert was fail, returned url is nil
}

Available methods:

decoder.decode(URL) -> URL?
decoder.decode(URL, completion: (URL?) -> Void)
decoder.decode(URL, into: URL) -> bool
decoder.decode(URL, into: URL, completion: (Bool) -> Void)

License

OggDecoder is available under the MIT License.

About

OGG decoder for iOS/MacOS based on Vorbis framework

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published