GithubHelp home page GithubHelp logo

Abandoned? about audiostreamer HOT 12 OPEN

mattgallagher avatar mattgallagher commented on July 17, 2024
Abandoned?

from audiostreamer.

Comments (12)

mikefrederick avatar mikefrederick commented on July 17, 2024

It seems to me like AVPlayer might be the best solution at this point.

from audiostreamer.

 avatar commented on July 17, 2024

This library is an essential part to numerous iphone apps --each one with their own fork, apparently. It fills a hole in iOS development, AVPlayer being too low level for a lot of people's needs.

It's a shame that someone hasn't taken over the project (and maybe even coordinated the forks).

from audiostreamer.

cbess avatar cbess commented on July 17, 2024

@autodidakto I used to use this proj heavily (I built a media player app around it). Now having switched to AVPlayer, I don't think AVPlayer is low-level at all: [AVPlayer playerWithURL:] handled my needs. Its really a high level API and it provides more feedback about its internals using AVPlayerItem and KVO. I accept the abandonment.

from audiostreamer.

mikefrederick avatar mikefrederick commented on July 17, 2024

Yeah, it is a shame. It is also a shame that AVAudioPlayer doesn't support streaming because I think AVPlayer is a bit messy and annoying to work with. If AVAudioPlayer supported streaming then a lot of people's problems would be solved.

I integrated AudioStreamer into an app I am currently working on and within a couple of days I had to dig in and fix 3 bugs that showed up. That makes me feel like AudioStreamer might not be suitable for production and that AVPlayer might be a better solution.

from audiostreamer.

myell0w avatar myell0w commented on July 17, 2024

for those of you who don't want to use AVPlayer: MPMoviePlayerController is working fine for audio-only streaming, despite the name and it's as high-level as it can get :)

from audiostreamer.

cbess avatar cbess commented on July 17, 2024

@mikefrederick AVPlayer works with local and remote files. AVAudioPlayer is a wrapper around AVPlayer and AVPlayerItem objects. You can get the same behavior by implementing your own audio player using those two classes (which I have done). And yes, my app streams audio. I say all that to say it wasn't a daunting task, if you can understand or modify AudioStreamer code, then making you own wrapper for the two classes will/should be a breeze.

from audiostreamer.

 avatar commented on July 17, 2024

A note about MPMoviePlayerController: It buffers the whole file, making it useless for 3G connections (apple will reject.)

And while I thank @cbess for the useful and correct guidance, the fact remains that the iOS community wants a maintained AudioStreamer(-like) project. As it stands, everyone is reinventing the wheel.

from audiostreamer.

mikefrederick avatar mikefrederick commented on July 17, 2024

@cbess I have also implemented an audio player using AVPlayer and AVPlayerItem. I agree that using AVPlayer is not a daunting task at all whatsoever, it would just be nice to have a cleaner and well-rounded solution (i.e. the use of a delegate instead of KVO and NSNotifications). For my particular task, I would really like to be able to use audio level metering with a streaming player -- something that I cannot figure out how to do with AVPlayer (it might not be possible). A couple of years ago I had to create an audio player from scratch with Core Audio (utilizing ffmpeg & streaming audio) and IMHO Core Audio is very poorly documented and it was was not a trivial task.

I did not know that AVAudioPlayer was a wrapper around AVPlayer & AVPlayerItem. How do you know this? Can you point me somewhere that suggests this is true? I would expect AVAudioPlayer to support streaming audio if this were the case. Also, AVAudioPlayer has been around since iOS 2.2, whereas AVPlayer is relatively new I believe.

from audiostreamer.

cbess avatar cbess commented on July 17, 2024

@mikefrederick Here is some support for my claim.

One: AV Foundation Programming
"There are two facets to the AV Foundation framework—API related just to audio, which was available prior to iOS 4; and API introduced in iOS 4 and later. The older audio-related classes provide easy ways to deal with audio. They are described in Multimedia Programming Guide, not in this document."

Two: Multimedia Programming Guide
"The AVAudioPlayer class provides a simple Objective-C interface for playing sounds. If your application does not require stereo positioning or precise synchronization, and if you are not playing audio captured from a network stream, Apple recommends that you use this class for playback."

Three: AV Foundation Programming
The layer photo at the top places iOS3 classes in the AVFoundation stack.

All of the above excerpts imply that AVAudioPlayer is a wrapper. And looking at AVPlayer and AVPlayerItem, which as you know come later, they expose most of the properties available from AVAudioPlayer, the other properties for metering will have to be implemented by you, using one of the other APIs. There doesn't seem to be a wrapper for the metering, other than AVAudioPlayer, but it is achievable without AVAudioPlayer.

I could give more examples but this is not for me to research, its mostly for you (since its your project). I could possibly help you implement it though.

from audiostreamer.

alexcrichton avatar alexcrichton commented on July 17, 2024

I'm not sure if anyone is still interested in this, I finally got around to taking a stab at actually figuring out what's going on here, and I've got a heavily modified version in one of my projects.

The major differences are:

  • Compiled with ARC
  • No internal thread, removed silly synchronization
  • General cleanup and exposure of some minutia through the API
  • Attempt at an explanation with a large header comment in the .h file
  • Plan on making it possible to buffer the entire audio stream immediately instead of limiting yourself to a statically sized buffer
  • Hopefully better management of state changes and error conditions.

I'd like to support OSX 10.6, so I can't use AVAudioPlayer sadly. If you'd like to keep using AudioStreamer, but have problems with it, I might be able to help out!

from audiostreamer.

 avatar commented on July 17, 2024

I'm still interested. Thanks for this. Maybe make a separate project for it? I think people will join in.

from audiostreamer.

alexcrichton avatar alexcrichton commented on July 17, 2024

I'll be maintaining and updating it here: https://github.com/alexcrichton/AudioStreamer

Instructions and better documentation will be coming shortly.

from audiostreamer.

Related Issues (20)

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.