# DOUAudioStreamer: a Core Audio streaming player for iOS and macOS apps

> DOUAudioStreamer is an Objective-C library that wraps Core Audio for remote URL, local file and media library playback. It suits developers embedding audio in an iOS or macOS app, and it is not a consumer streaming app.

**douban/DOUAudioStreamer** — A Core Audio based streaming audio player for iOS and macOS

- Repository: https://github.com/douban/DOUAudioStreamer
- Stars: 2,747 · Forks: 543
- Language: Objective-C
- License: BSD-3-Clause
- Published: 2026-09-28 · Updated: 2026-09-28 · Language: en
- Canonical page: https://hysenlabs.com/projects/douban-douaudiostreamer

## What DOUAudioStreamer actually solves for an app developer

Playing a remote audio URL on Apple platforms is not one API call. You open a network stream, feed bytes to an audio queue, keep a buffer ahead of the playhead, decode, and report progress back to a UI that must not block. DOUAudioStreamer packages that pipeline behind a small Objective-C object so the app code only has to supply a URL and observe a status property.

The audience is narrow and specific: developers writing native iOS or macOS applications in Objective-C, or in Swift through the generated bridging header. The README lists iOS 5.0+ and macOS 10.7+ as the minimums, which tells you the API surface is old enough that it does not depend on modern concurrency features. If you are building a web player, a server-side transcoder, or an Android app, this project has nothing for you.

## The DOUAudioFile protocol and the Core Audio pipeline behind it

The design separates the thing being played from the thing doing the playing. A class conforms to DOUAudioFile and exposes the audio location; DOUAudioStreamer consumes that object and owns the playback machinery. The README shows the conforming class carrying a single NSURL property, which means the library decides how to fetch and decode rather than the caller.

The streamer exposes a status property intended for KVO observation, plus duration, currentTime, bufferingRatio, expectedLength, receivedLength and downloadSpeed. That set is the interesting part of the design: bufferingRatio and downloadSpeed are network-facing numbers, so a UI can show a buffer bar and a transfer rate without the app touching the underlying connection. Playback control is limited to play, pause and stop. The README also mentions optional audio analyzers and visualization helpers, but does not document their API, so treat visualization as something you would have to read the source to use.

One structural detail worth noting: the repository has a python/ directory at the top level alongside src/ and example/. The README never mentions it, so its role is not established by the documentation.

## Installing DOUAudioStreamer with CocoaPods or by dragging src

The README gives two installation paths. The first is CocoaPods. Add the pod to your Podfile and run the install command. The README does not pin a version, so the podspec in the repository is the place to check what you will actually resolve.

```ruby
pod 'DOUAudioStreamer'
```

```sh
pod install
```

After pod install, open the generated workspace rather than the project file. The second path is manual: download the archive, then drag everything in the src folder into your Xcode project. The README notes the library requires ARC, so a target compiling it without ARC will not work.

A first real use is short. Define a class that conforms to DOUAudioFile and give it a URL, then hand an instance to the streamer and call play.

```objc
#import "DOUAudioFile.h"

@interface Track : NSObject <DOUAudioFile>

@property (nonatomic, strong) NSURL *audioFileURL;

@end
```

```objc
#import "DOUAudioStreamer.h"

Track *track = [[Track alloc] init];
track.audioFileURL = [NSURL URLWithString:@"https://example.com/audio.mp3"];

DOUAudioStreamer *streamer = [DOUAudioStreamer streamerWithAudioFile:track];
[streamer play];
```

What you should see is playback starting once enough data is buffered, with the status property changing as the streamer moves between states. The README does not enumerate the possible status values, so log them rather than assuming a fixed set. A working demonstration lives in the example folder under example/DOUASDemo; building that first is faster than wiring the pod into an existing app.

## Where DOUAudioStreamer is the wrong tool

The README documents play, pause and stop and nothing else. There is no queue, no next-track handling, no seek method mentioned, and no gapless playback. If your product is a music app with a playlist, you are building the queue layer yourself on top of this.

Background playback and the audio session configuration that iOS requires for it are also absent from the documentation. The README is silent on interruptions, route changes and the Now Playing integration, which are the parts most likely to generate bug reports. The same silence applies to DRM and to encrypted streams.

There is a second mismatch worth stating plainly. The related searches around this project are dominated by consumer questions about home audio streamers, DACs and streaming services. DOUAudioStreamer is none of those. It is a library with no app, no user interface and no hardware. Anyone arriving from that search intent will be disappointed, and that is a documentation and naming problem the project has not addressed.

## How it compares with AVPlayer and AVAudioEngine

The natural alternative on Apple platforms is AVPlayer from AVFoundation. The difference is the layer each one occupies. AVPlayer is a high-level playback object that handles HTTP streaming, media selection, AirPlay routing and the system Now Playing integration for you. DOUAudioStreamer sits lower: it drives Core Audio directly and surfaces raw transport numbers such as receivedLength and downloadSpeed. If you need those numbers, or you need to control the buffering behaviour yourself, the lower layer is the reason to pick this project. If you want the system to handle streaming semantics, AVPlayer is the shorter path and the one Apple maintains.

AVAudioEngine is the other comparison point, but it is a different kind of tool: a graph for processing and rendering audio, not a network streamer. Choosing between DOUAudioStreamer and AVAudioEngine is really a question of whether you want a player or a signal graph. The README's mention of audio analyzers hints at the latter, but without documented APIs that is not a basis for a decision.

## Maintenance, upgrade cost and the BSD-3-Clause licence

The repository is not archived, and the last push was on 2026-05-31, which is recent enough that the codebase is not abandoned. There are no retrieved releases, so versioning is whatever the podspec and the master branch say at the moment you read them. That has a practical consequence: pinning a version in your Podfile is the only way to make a build reproducible, and the README does not tell you which version to pin.

Upgrade cost is dominated by the platform minimums. The README states iOS 5.0+ and macOS 10.7+, both long obsolete as deployment targets, which suggests the source has not been modernised for current SDKs. Expect to verify compilation yourself. Because the library is Objective-C and ARC-based, it integrates into Swift projects through a bridging header, and the README does not describe that setup.

The licence is BSD-3-Clause, and the README points to the LICENSE file for the full text. That is a permissive licence, which generally means you can use and distribute the code in closed-source products provided the copyright notice and licence text are retained. This is not legal advice; read the LICENSE file and follow your organisation's review process.

## Conclusion

Adopt DOUAudioStreamer if you are shipping an Objective-C or Swift iOS/macOS app that needs to stream a URL or play a local file and you want playback status, buffering ratio and download speed exposed as observable properties. Do not adopt it if you need gapless queueing, background playback, DRM, or a player you can configure without writing an app around it: the README documents none of those, and the library is a playback engine, not a finished product. Before you commit, verify the two things the README leaves open: whether the bundled example still builds against your current Xcode and SDK, and how the BSD-3-Clause terms interact with the rest of your dependency graph. Start by building example/DOUASDemo, not by reading the podspec.

## FAQ

### How does DOUAudioStreamer work?

It drives Core Audio directly and plays audio from a remote URL, a local file or a media library item supplied through the DOUAudioFile protocol. The streamer exposes playback status, duration, current time, buffering ratio, cache path and download speed, and supports play, pause and stop.

### How do I install DOUAudioStreamer?

Add pod 'DOUAudioStreamer' to your Podfile and run pod install, or download the archive and drag everything in the src folder into your Xcode project. The README notes the library requires ARC.

### Which platforms does DOUAudioStreamer support?

The README lists iOS 5.0+ and macOS 10.7+ as the minimum requirements, and the library is written in Objective-C.

### Is DOUAudioStreamer a music streaming app?

No. It is a Core Audio based streaming audio player library for iOS and macOS, with no user interface of its own. The README describes it as a library that plays audio from URLs, local files and media library items.

## Sources

- [douban/DOUAudioStreamer on GitHub](https://github.com/douban/DOUAudioStreamer)
- [Issues](https://github.com/douban/DOUAudioStreamer/issues)
- [License: BSD-3-Clause](https://github.com/douban/DOUAudioStreamer/blob/master/LICENSE)
- [README](https://github.com/douban/DOUAudioStreamer/blob/master/README.md)

---

Hysen Labs editorial analysis, written from the project's own repository and release notes. Cite the canonical page: https://hysenlabs.com/projects/douban-douaudiostreamer
