StreamingKit/index.html

88 lines
4.5 KiB
HTML

<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="chrome=1">
<title>Audjustable by tumtumtum</title>
<link rel="stylesheet" href="stylesheets/styles.css">
<link rel="stylesheet" href="stylesheets/pygment_trac.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
<script src="javascripts/respond.js"></script>
<!--[if lt IE 9]>
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<!--[if lt IE 8]>
<link rel="stylesheet" href="stylesheets/ie.css">
<![endif]-->
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
</head>
<body>
<div id="header">
<nav>
<li class="fork"><a href="https://github.com/tumtumtum/audjustable">View On GitHub</a></li>
<li class="downloads"><a href="https://github.com/tumtumtum/audjustable/zipball/master">ZIP</a></li>
<li class="downloads"><a href="https://github.com/tumtumtum/audjustable/tarball/master">TAR</a></li>
<li class="title">DOWNLOADS</li>
</nav>
</div><!-- end header -->
<div class="wrapper">
<section>
<div id="title">
<h1>Audjustable</h1>
<p>A fast and extensible audio streamer for iOS and OSX with support for gapless playback and custom (non-HTTP) sources</p>
<hr>
<span class="credits left">Project maintained by <a href="https://github.com/tumtumtum">tumtumtum</a></span>
<span class="credits right">Hosted on GitHub Pages &mdash; Theme by <a href="http://twitter.com/#!/michigangraham">mattgraham</a></span>
</div>
<h3>Audjustable Audio Streamer</h3>
<p><a href="http://tumtumtum.github.com/audjustable">Homepage</a></p>
<p>Audjustable is audio streaming class for iOS and OSX. Audjustable uses CoreAudio to decompress and playback audio whilst providing a clean and simple object-oriented API.</p>
<h2>Features</h2>
<ul>
<li>Simple OOP API</li>
<li>Easy to read source</li>
<li>Adjustable audio buffering</li>
<li>Buffered and gapless playback</li>
<li>Easy to implement audio data sources (HTTP and local file system DataSources provided)</li>
<li>Easy to extend DataSource to support adaptive buffering, encryption etc</li>
<li>Optimised for low CPU/battery usage</li>
</ul><h2>Usage</h2>
<p>Download the <a href="https://github.com/tumtumtum/audjustable/zipball/master">source</a> which includes a simple audio player project that streams audio over HTTP or locally using the <code>HttpDataSource</code> or `LocalFileDataSource" classes respectively.</p>
<p>If you would like to integrate the AudioPlayer directly into your project you only need to copy the files inside the <code>/Audjustable/Classes/AudioPlayer</code> <a href="https://github.com/tumtumtum/audjustable/tree/master/Audjustable/Classes/AudioPlayer">directory</a> into your project.</p>
<h2>Code</h2>
<p>There are two main classes. The <code>DataSource</code> class which is the abstract base class for the various compressed audio data sources (HTTP, local file are provided). The <code>AudioPlayer</code> class manages and renders audio from a queue DataSources.</p>
<div class="highlight"><pre>
<span class="c1">// Create AudioPlayer</span>
<span class="n">AudioPlayer</span><span class="o">*</span> <span class="n">audioPlayer</span> <span class="o">=</span> <span class="p">[[</span><span class="n">AudioPlayer</span> <span class="n">alloc</span><span class="p">]</span> <span class="n">init</span><span class="p">];</span>
<span class="n">audioPlayer</span><span class="p">.</span><span class="n">delegate</span> <span class="o">=</span> <span class="n">self</span><span class="p">;</span>
<span class="c1">// Queue on a URL to play. Each queue item has a unique ID (item1) that to identify the related file in delegate callbacks</span>
<span class="p">[</span><span class="n">audioPlayer</span> <span class="nl">setDataSource:</span><span class="p">[</span><span class="n">audioPlayer</span> <span class="nl">dataSourceFromURL:</span><span class="s">@"https://github.com/downloads/tumtumtum/audjustable/sample.m4a"</span><span class="p">]</span> <span class="nl">withQueueItemId:</span><span class="s">@"item1"</span><span class="p">];</span>
</pre></div>
<h3>Authors and Contributors</h3>
<p>Copyright 2012, Thong Nguyen (<a href="https://github.com/tumtumtum" class="user-mention">@tumtumtum</a>)</p>
</section>
</div>
<!--[if !IE]><script>fixScale(document);</script><![endif]-->
</body>
</html>