Giter Site home page Giter Site logo

lcardevnas / soundable Goto Github PK

View Code? Open in Web Editor NEW
92.0 5.0 9.0 4.26 MB

Soundable allows you to play sounds, single and in sequence, in a very easy way

License: MIT License

Swift 94.56% Ruby 2.39% Objective-C 3.05%
avfoundation sound audio swift avaudioplayer avqueueplayer play-audio cocoapods carthage avaudiosession

soundable's People

Contributors

thxou avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

soundable's Issues

Seek and CrossFade?

Any plans to support real-time seeking through an audio stream, as well as crossfade effects?

does not loop

Hello, i tested with my sound and found it does not loop, can u help?

let sound = Sound(fileName: "Ringtone.caf")
            sound.play(groupKey: "outgoing", loopsCount: 10) { (error) in
                print("play error: \(error)")
            }

Play sequence of sounds without delay?

Hello,
I'm wondering if it's possible to play a sequence of sounds without any delay. I'm using:
let sound1 = Sound(fileName: "guitar-chord.wav")
let sound2 = Sound(fileName: "rain.mp3")
let sound3 = Sound(fileName: "water-stream.wav")

let sounds = [sound1, sound2, sound3]
sounds.play()

and there is a slight delay before each new sound starts.

Thanks!

Can't play URL audio?

let sound = Sound(url: url)

error creating player with provided url: Error Domain=NSOSStatusErrorDomain Code=2003334207 "(null)"

play from folder

If files are located in subfolder thant it will not play even if to indicate file with path
Sound.swfit
should be changed to this function

public init(fileName: String, bundle: Bundle = Bundle.main) {
    super.init()
    
    let urlName = URL(fileURLWithPath: fileName)
    let file = urlName.deletingPathExtension().path
    let fileExtension = urlName.pathExtension
    
    name = fileName
    if let path =  bundle.path(forResource: file, ofType: fileExtension) {
        url = URL(fileURLWithPath: path)
        identifier = url?.absoluteString ?? ""
    }
    
    preparePlayer()
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.