• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1**iolib**
2==========
3Classes for playing audio data.
4
5## Abstract
6(Oboe) **iolib** contains classes implementing streaming audio playback and mixing from multiple sources. It's purpose is to demonstrate best practices and provide reusable code.
7
8 Note: the more general name of "iolib" was chosen  since it is presumed that this project will eventually implement audio capture capability.
9
10**iolib** is written in C++ and is intended to be called from Android native code. It is implemented as a static library.
11
12# **iolib** project structure
13* player
14Contains classes to support streaming playback from (potentially) multiple audio sources.
15
16## player classes
17### DataSource
18Declares the basic interface for audio data sources.
19
20### SampleSource
21Extends the `DataSource` interface for audio data coming from SampleBuffer objects.
22
23### OneShotSampleSource
24Extends `SampleSource` to provide data that plays through it's `SampleBuffer` and then provides silence, (i.e. a non-looping sample)
25
26### SampleBuffer
27Loads and holds (in memory) audio sample data and provides read-only access to that data.
28
29### SimpleMultiPlayer
30Implements an Oboe audio stream into which it mixes audio from some number of `SampleSource`s.
31
32This class demonstrates:
33* Creation and lifetime management of an Oboe audio stream (`ManagedStream`)
34* Logic for an Oboe `AudioStreamCallback` interface.
35* Logic for handling streaming restart on error (i.e. playback device changes)
36