Restructure the reference section

This commit is contained in:
Nguyễn Gia Phong 2020-04-07 20:28:34 +07:00
parent a8e039a9f0
commit f3da7f8e24
23 changed files with 852 additions and 681 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -1,4 +1,4 @@
# Sphinx build info version 1
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
config: 5938d50d60be4fc83e2c379fb163f4ee
config: 8973cb3fb046b41f6f51ac1468f3a8cc
tags: 645f666f9bcd5a90fca523b33c5a78b7

View File

@ -10,28 +10,6 @@ Cython, Python and C++11.
.. _alure: https://github.com/kcat/alure
Project Overview
----------------
Before diving into the design, here is a brief overview of the functionalities
provided by palace:
#. Audio device creation and auxiliary functionalities:
:py:const:`palace.device_names`, :py:func:`palace.query_extension`
and :py:class:`palace.Device`
#. Context creation and management: :py:func:`palace.current_context`,
:py:func:`palace.use_context`, :py:class:`palace.Context`,
:py:class:`palace.Listener` and :py:class:`palace.MessageHandler`
#. Creation and caching of internal audio decoders and user-defined ones:
:py:class:`palace.Decoder`, :py:class:`palace.BaseDecoder`,
:py:data:`palace.decoder_factories`, :py:class:`palace.FileIO`,
:py:func:`palace.current_fileio`, :py:func:`palace.use_fileio`
and :py:class:`palace.Buffer`
#. Source of audio playback: :py:class:`palace.Source`
and :py:class:`palace.SourceGroup`
#. Audio effect: :py:class:`palace.AuxiliaryEffectSlot`
and :py:class:`palace.Effect`
.. _impl-idiom:
The Impl Idiom

View File

@ -6,8 +6,8 @@ Welcome to our palace!
:caption: Contents:
installation
design
reference
design
Indices and tables

View File

@ -1,5 +1,165 @@
Reference
=========
.. automodule:: palace
.. currentmodule:: palace
Audio Devices
-------------
.. data:: device_names
:type: DeviceNames
Read-only namespace of device names by category (``basic``, ``full`` and
``capture``), as tuples of strings whose first item being the default.
.. autofunction:: query_extension
.. autoclass:: Device
:members:
Audio Library Contexts
----------------------
.. data:: CHANNEL_CONFIG
:type: int
Context creation key to specify the channel configuration
(either ``MONO``, ``STEREO``, ``QUAD``, ``X51``, ``X61`` or ``X71``).
.. data:: SAMPLE_TYPE
:type: int
Context creation key to specify the sample type
(either ``[UNSIGNED_]{BYTE,SHORT,INT}`` or ``FLOAT``).
.. data:: FREQUENCY
:type: int
Context creation key to specify the frequency in hertz.
.. data:: MONO_SOURCES
:type: int
Context creation key to specify the number of mono (3D) sources.
.. data:: STEREO_SOURCES
:type: int
Context creation key to specify the number of stereo sources.
.. data:: MAX_AUXILIARY_SENDS
:type: int
Context creation key to specify the maximum number of
auxiliary source sends.
.. data:: HRTF
:type: int
Context creation key to specify whether to enable HRTF
(either ``FALSE``, ``TRUE`` or ``DONT_CARE``).
.. data:: HRTF_ID
:type: int
Context creation key to specify the HRTF to be used.
.. data:: OUTPUT_LIMITER
:type: int
Context creation key to specify whether to use a gain limiter
(either ``FALSE``, ``TRUE`` or ``DONT_CARE``).
.. data:: distance_models
:type: Tuple[str, ...]
Names of available distance models.
.. autofunction:: thread_local
.. autofunction:: current_context
.. autofunction:: use_context
.. autoclass:: Context
:members:
.. autoclass:: Listener
:members:
.. autoclass:: MessageHandler
:members:
Resource Caching
----------------
.. autofunction:: cache
.. autofunction:: free
.. autoclass:: Buffer
:members:
Sources & Source Groups
-----------------------
.. autoclass:: Source
:members:
.. autoclass:: SourceGroup
:members:
Environmental Effects
---------------------
.. data:: reverb_preset_names
:type: Tuple[str, ...]
Names of predefined reverb effect presets in lexicographical order.
.. autoclass:: Effect
:members:
Decoder Interface
-----------------
.. data:: sample_types
:type: Tuple[str, ...]
Names of available sample types.
.. data:: channel_configs
:type: Tuple[str, ...]
Names of available channel configurations.
.. data:: decoder_factories
:type: DecoderNamespace
Simple object for storing decoder factories.
User-registered factories are tried one after another
if :py:exc:`RuntimeError` is raised, in lexicographical order.
Internal decoder factories are always used after registered ones.
.. autofunction:: decode
.. autofunction:: sample_size
.. autofunction:: sample_length
.. autoclass:: Decoder
:members:
.. autoclass:: BaseDecoder
:members:
File I/O Interface
------------------
.. autofunction:: current_fileio
.. autofunction:: use_fileio
.. autoclass:: FileIO
:members:

View File

@ -1,6 +1,6 @@
var DOCUMENTATION_OPTIONS = {
URL_ROOT: document.getElementById("documentation_options").getAttribute('data-url_root'),
VERSION: '0.1.0',
VERSION: '0.1.3',
LANGUAGE: 'None',
COLLAPSE_INDEX: false,
BUILDER: 'html',

View File

@ -1,10 +1,10 @@
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<html>
<head>
<meta charset="utf-8" />
<title>Design Principles &#8212; palace 0.1.0 documentation</title>
<title>Design Principles &#8212; palace 0.1.3 documentation</title>
<link rel="stylesheet" href="_static/alabaster.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<script id="documentation_options" data-url_root="./" src="_static/documentation_options.js"></script>
@ -14,8 +14,7 @@
<script src="_static/language_data.js"></script>
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="search.html" />
<link rel="next" title="Reference" href="reference.html" />
<link rel="prev" title="Installation" href="installation.html" />
<link rel="prev" title="Reference" href="reference.html" />
<link rel="stylesheet" href="_static/custom.css" type="text/css" />
@ -39,28 +38,6 @@ a safe, efficient, easy-to-use and extendable 3D audio library for Python,
by wrapping existing functionalities from the C++ API <a class="reference external" href="https://github.com/kcat/alure">alure</a>.</p>
<p>This part of the documentation assumes its reader are at least familiar with
Cython, Python and C++11.</p>
<div class="section" id="project-overview">
<h2>Project Overview<a class="headerlink" href="#project-overview" title="Permalink to this headline"></a></h2>
<p>Before diving into the design, here is a brief overview of the functionalities
provided by palace:</p>
<ol class="arabic simple">
<li><p>Audio device creation and auxiliary functionalities:
<a class="reference internal" href="reference.html#palace.device_names" title="palace.device_names"><code class="xref py py-const docutils literal notranslate"><span class="pre">palace.device_names</span></code></a>, <a class="reference internal" href="reference.html#palace.query_extension" title="palace.query_extension"><code class="xref py py-func docutils literal notranslate"><span class="pre">palace.query_extension()</span></code></a>
and <a class="reference internal" href="reference.html#palace.Device" title="palace.Device"><code class="xref py py-class docutils literal notranslate"><span class="pre">palace.Device</span></code></a></p></li>
<li><p>Context creation and management: <a class="reference internal" href="reference.html#palace.current_context" title="palace.current_context"><code class="xref py py-func docutils literal notranslate"><span class="pre">palace.current_context()</span></code></a>,
<a class="reference internal" href="reference.html#palace.use_context" title="palace.use_context"><code class="xref py py-func docutils literal notranslate"><span class="pre">palace.use_context()</span></code></a>, <a class="reference internal" href="reference.html#palace.Context" title="palace.Context"><code class="xref py py-class docutils literal notranslate"><span class="pre">palace.Context</span></code></a>,
<a class="reference internal" href="reference.html#palace.Listener" title="palace.Listener"><code class="xref py py-class docutils literal notranslate"><span class="pre">palace.Listener</span></code></a> and <a class="reference internal" href="reference.html#palace.MessageHandler" title="palace.MessageHandler"><code class="xref py py-class docutils literal notranslate"><span class="pre">palace.MessageHandler</span></code></a></p></li>
<li><p>Creation and caching of internal audio decoders and user-defined ones:
<a class="reference internal" href="reference.html#palace.Decoder" title="palace.Decoder"><code class="xref py py-class docutils literal notranslate"><span class="pre">palace.Decoder</span></code></a>, <a class="reference internal" href="reference.html#palace.BaseDecoder" title="palace.BaseDecoder"><code class="xref py py-class docutils literal notranslate"><span class="pre">palace.BaseDecoder</span></code></a>,
<a class="reference internal" href="reference.html#palace.decoder_factories" title="palace.decoder_factories"><code class="xref py py-data docutils literal notranslate"><span class="pre">palace.decoder_factories</span></code></a>, <a class="reference internal" href="reference.html#palace.FileIO" title="palace.FileIO"><code class="xref py py-class docutils literal notranslate"><span class="pre">palace.FileIO</span></code></a>,
<a class="reference internal" href="reference.html#palace.current_fileio" title="palace.current_fileio"><code class="xref py py-func docutils literal notranslate"><span class="pre">palace.current_fileio()</span></code></a>, <a class="reference internal" href="reference.html#palace.use_fileio" title="palace.use_fileio"><code class="xref py py-func docutils literal notranslate"><span class="pre">palace.use_fileio()</span></code></a>
and <a class="reference internal" href="reference.html#palace.Buffer" title="palace.Buffer"><code class="xref py py-class docutils literal notranslate"><span class="pre">palace.Buffer</span></code></a></p></li>
<li><p>Source of audio playback: <a class="reference internal" href="reference.html#palace.Source" title="palace.Source"><code class="xref py py-class docutils literal notranslate"><span class="pre">palace.Source</span></code></a>
and <a class="reference internal" href="reference.html#palace.SourceGroup" title="palace.SourceGroup"><code class="xref py py-class docutils literal notranslate"><span class="pre">palace.SourceGroup</span></code></a></p></li>
<li><p>Audio effect: <a class="reference internal" href="reference.html#palace.AuxiliaryEffectSlot" title="palace.AuxiliaryEffectSlot"><code class="xref py py-class docutils literal notranslate"><span class="pre">palace.AuxiliaryEffectSlot</span></code></a>
and <a class="reference internal" href="reference.html#palace.Effect" title="palace.Effect"><code class="xref py py-class docutils literal notranslate"><span class="pre">palace.Effect</span></code></a></p></li>
</ol>
</div>
<div class="section" id="the-impl-idiom">
<span id="impl-idiom"></span><h2>The Impl Idiom<a class="headerlink" href="#the-impl-idiom" title="Permalink to this headline"></a></h2>
<p><em>Not to be confused with</em> <a class="reference external" href="https://wiki.c2.com/?PimplIdiom">the pimpl idiom</a>.</p>
@ -226,22 +203,20 @@ implementation as a pure Python class and <a class="reference internal" href="#g
<p class="caption"><span class="caption-text">Contents:</span></p>
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="installation.html">Installation</a></li>
<li class="toctree-l1"><a class="reference internal" href="reference.html">Reference</a></li>
<li class="toctree-l1 current"><a class="current reference internal" href="#">Design Principles</a><ul>
<li class="toctree-l2"><a class="reference internal" href="#project-overview">Project Overview</a></li>
<li class="toctree-l2"><a class="reference internal" href="#the-impl-idiom">The Impl Idiom</a></li>
<li class="toctree-l2"><a class="reference internal" href="#the-modern-python">The Modern Python</a></li>
<li class="toctree-l2"><a class="reference internal" href="#the-double-reference">The Double Reference</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="reference.html">Reference</a></li>
</ul>
<div class="relations">
<h3>Related Topics</h3>
<ul>
<li><a href="index.html">Documentation overview</a><ul>
<li>Previous: <a href="installation.html" title="previous chapter">Installation</a></li>
<li>Next: <a href="reference.html" title="next chapter">Reference</a></li>
<li>Previous: <a href="reference.html" title="previous chapter">Reference</a></li>
</ul></li>
</ul>
</div>
@ -271,7 +246,7 @@ implementation as a pure Python class and <a class="reference internal" href="#g
&copy;2019, 2020 Nguyễn Gia Phong et al.
|
Powered by <a href="http://sphinx-doc.org/">Sphinx 3.0.0+/4e6f8bc</a>
Powered by <a href="http://sphinx-doc.org/">Sphinx 3.0.1</a>
&amp; <a href="https://github.com/bitprophet/alabaster">Alabaster 0.7.12</a>
|

View File

@ -2,10 +2,10 @@
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<html>
<head>
<meta charset="utf-8" />
<title>Index &#8212; palace 0.1.0 documentation</title>
<title>Index &#8212; palace 0.1.3 documentation</title>
<link rel="stylesheet" href="_static/alabaster.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<script id="documentation_options" data-url_root="./" src="_static/documentation_options.js"></script>
@ -63,16 +63,10 @@
<li><a href="reference.html#palace.Source.air_absorption_factor">air_absorption_factor (palace.Source attribute)</a>
</li>
<li><a href="reference.html#palace.Device.alc_version">alc_version() (palace.Device property)</a>
</li>
<li><a href="reference.html#palace.Context.async_wake_interval">async_wake_interval (palace.Context attribute)</a>
</li>
</ul></td>
<td style="width: 33%; vertical-align: top;"><ul>
<li><a href="reference.html#palace.Source.auxiliary_send">auxiliary_send() (palace.Source property)</a>
</li>
<li><a href="reference.html#palace.Source.auxiliary_send_filter">auxiliary_send_filter() (palace.Source property)</a>
</li>
<li><a href="reference.html#palace.AuxiliaryEffectSlot">AuxiliaryEffectSlot (class in palace)</a>
<li><a href="reference.html#palace.Context.async_wake_interval">async_wake_interval (palace.Context attribute)</a>
</li>
<li><a href="reference.html#palace.Context.available_resamplers">available_resamplers() (palace.Context property)</a>
</li>
@ -98,6 +92,8 @@
<h2 id="C">C</h2>
<table style="width: 100%" class="indextable genindextable"><tr>
<td style="width: 33%; vertical-align: top;"><ul>
<li><a href="reference.html#palace.cache">cache() (in module palace)</a>
</li>
<li><a href="reference.html#palace.CHANNEL_CONFIG">CHANNEL_CONFIG (in module palace)</a>
</li>
<li><a href="reference.html#palace.BaseDecoder.channel_config">channel_config() (palace.BaseDecoder property)</a>
@ -111,11 +107,11 @@
<li><a href="reference.html#palace.channel_configs">channel_configs (in module palace)</a>
</li>
<li><a href="reference.html#palace.Effect.chorus_properties">chorus_properties() (palace.Effect property)</a>
</li>
<li><a href="reference.html#palace.Device.clock_time">clock_time() (palace.Device property)</a>
</li>
</ul></td>
<td style="width: 33%; vertical-align: top;"><ul>
<li><a href="reference.html#palace.Device.clock_time">clock_time() (palace.Device property)</a>
</li>
<li><a href="reference.html#palace.Device.close">close() (palace.Device method)</a>
<ul>
@ -138,17 +134,17 @@
<h2 id="D">D</h2>
<table style="width: 100%" class="indextable genindextable"><tr>
<td style="width: 33%; vertical-align: top;"><ul>
<li><a href="reference.html#palace.decode">decode() (in module palace)</a>
</li>
<li><a href="reference.html#palace.Decoder">Decoder (class in palace)</a>
</li>
<li><a href="reference.html#palace.decoder_factories">decoder_factories (in module palace)</a>
</li>
<li><a href="reference.html#palace.Context.default_resampler_index">default_resampler_index() (palace.Context property)</a>
</li>
<li><a href="reference.html#palace.AuxiliaryEffectSlot.destroy">destroy() (palace.AuxiliaryEffectSlot method)</a>
<li><a href="reference.html#palace.Buffer.destroy">destroy() (palace.Buffer method)</a>
<ul>
<li><a href="reference.html#palace.Buffer.destroy">(palace.Buffer method)</a>
</li>
<li><a href="reference.html#palace.Context.destroy">(palace.Context method)</a>
</li>
<li><a href="reference.html#palace.Effect.destroy">(palace.Effect method)</a>
@ -161,16 +157,14 @@
</ul></td>
<td style="width: 33%; vertical-align: top;"><ul>
<li><a href="reference.html#palace.Device">Device (class in palace)</a>
</li>
<li><a href="reference.html#palace.Context.device">device (palace.Context attribute)</a>
</li>
<li><a href="reference.html#palace.MessageHandler.device_disconnected">device_disconnected() (palace.MessageHandler method)</a>
</li>
<li><a href="reference.html#palace.device_names">device_names (in module palace)</a>
</li>
<li><a href="reference.html#palace.Source.direct_filter">direct_filter() (palace.Source property)</a>
</li>
<li><a href="reference.html#palace.Context.distance_model">distance_model() (palace.Context property)</a>
</li>
<li><a href="reference.html#palace.distance_models">distance_models (in module palace)</a>
</li>
<li><a href="reference.html#palace.Source.distance_range">distance_range (palace.Source attribute)</a>
</li>
@ -185,8 +179,6 @@
<table style="width: 100%" class="indextable genindextable"><tr>
<td style="width: 33%; vertical-align: top;"><ul>
<li><a href="reference.html#palace.Effect">Effect (class in palace)</a>
</li>
<li><a href="reference.html#palace.AuxiliaryEffectSlot.effect">effect() (palace.AuxiliaryEffectSlot property)</a>
</li>
</ul></td>
<td style="width: 33%; vertical-align: top;"><ul>
@ -203,9 +195,15 @@
<li><a href="reference.html#palace.Source.fade_out_to_stop">fade_out_to_stop() (palace.Source method)</a>
</li>
<li><a href="reference.html#palace.FileIO">FileIO (class in palace)</a>
</li>
<li><a href="reference.html#palace.Source.filter">filter() (palace.Source property)</a>
</li>
<li><a href="reference.html#palace.free">free() (in module palace)</a>
</li>
<li><a href="reference.html#palace.FREQUENCY">FREQUENCY (in module palace)</a>
</li>
</ul></td>
<td style="width: 33%; vertical-align: top;"><ul>
<li><a href="reference.html#palace.BaseDecoder.frequency">frequency() (palace.BaseDecoder property)</a>
<ul>
@ -216,8 +214,6 @@
<li><a href="reference.html#palace.Device.frequency">(palace.Device property)</a>
</li>
</ul></li>
</ul></td>
<td style="width: 33%; vertical-align: top;"><ul>
<li><a href="reference.html#palace.Buffer.from_decoder">from_decoder() (palace.Buffer static method)</a>
</li>
</ul></td>
@ -232,7 +228,7 @@
<li><a href="reference.html#palace.SourceGroup.gain">(palace.SourceGroup attribute)</a>
</li>
</ul></li>
<li><a href="reference.html#palace.AuxiliaryEffectSlot.gain">gain() (palace.AuxiliaryEffectSlot property)</a>
<li><a href="reference.html#palace.Effect.gain">gain() (palace.Effect property)</a>
<ul>
<li><a href="reference.html#palace.Listener.gain">(palace.Listener property)</a>
@ -297,8 +293,6 @@
</ul></td>
<td style="width: 33%; vertical-align: top;"><ul>
<li><a href="reference.html#palace.Listener">Listener (class in palace)</a>
</li>
<li><a href="reference.html#palace.Context.listener">listener (palace.Context attribute)</a>
</li>
<li><a href="reference.html#palace.Buffer.loop_points">loop_points (palace.Buffer attribute)</a>
</li>
@ -321,20 +315,13 @@
<li><a href="reference.html#palace.Device.max_auxiliary_sends">max_auxiliary_sends() (palace.Device property)</a>
</li>
<li><a href="reference.html#palace.Context.message_handler">message_handler (palace.Context attribute)</a>
</li>
<li><a href="reference.html#palace.MessageHandler">MessageHandler (class in palace)</a>
</li>
</ul></td>
<td style="width: 33%; vertical-align: top;"><ul>
<li><a href="reference.html#palace.MessageHandler">MessageHandler (class in palace)</a>
</li>
<li><a href="reference.html#palace.Listener.meters_per_unit">meters_per_unit() (palace.Listener property)</a>
</li>
<li>
module
<ul>
<li><a href="reference.html#module-palace">palace</a>
</li>
</ul></li>
<li><a href="reference.html#palace.MONO_SOURCES">MONO_SOURCES (in module palace)</a>
</li>
</ul></td>
@ -342,10 +329,6 @@
<h2 id="N">N</h2>
<table style="width: 100%" class="indextable genindextable"><tr>
<td style="width: 33%; vertical-align: top;"><ul>
<li><a href="reference.html#palace.Buffer.name">name (palace.Buffer attribute)</a>
</li>
</ul></td>
<td style="width: 33%; vertical-align: top;"><ul>
<li><a href="reference.html#palace.Device.name">name() (palace.Device property)</a>
</li>
@ -375,13 +358,6 @@
<h2 id="P">P</h2>
<table style="width: 100%" class="indextable genindextable"><tr>
<td style="width: 33%; vertical-align: top;"><ul>
<li>
palace
<ul>
<li><a href="reference.html#module-palace">module</a>
</li>
</ul></li>
<li><a href="reference.html#palace.SourceGroup.parent_group">parent_group (palace.SourceGroup attribute)</a>
</li>
<li><a href="reference.html#palace.Source.pause">pause() (palace.Source method)</a>
@ -415,8 +391,6 @@
<li><a href="reference.html#palace.Source.position">position (palace.Source attribute)</a>
</li>
<li><a href="reference.html#palace.Listener.position">position() (palace.Listener property)</a>
</li>
<li><a href="reference.html#palace.Context.precache_buffers_async">precache_buffers_async() (palace.Context method)</a>
</li>
<li><a href="reference.html#palace.Source.priority">priority (palace.Source attribute)</a>
</li>
@ -502,13 +476,11 @@
<li><a href="reference.html#palace.FileIO.seek">(palace.FileIO method)</a>
</li>
</ul></li>
<li><a href="reference.html#palace.AuxiliaryEffectSlot.send_auto">send_auto() (palace.AuxiliaryEffectSlot property)</a>
<li><a href="reference.html#palace.Effect.send_auto">send_auto() (palace.Effect property)</a>
</li>
<li><a href="reference.html#palace.Source.send_filter">send_filter() (palace.Source property)</a>
<li><a href="reference.html#palace.Source.sends">sends() (palace.Source property)</a>
</li>
<li><a href="reference.html#palace.Buffer.size">size() (palace.Buffer property)</a>
</li>
<li><a href="reference.html#palace.Decoder.smart">smart() (palace.Decoder static method)</a>
</li>
<li><a href="reference.html#palace.Source">Source (class in palace)</a>
</li>
@ -518,7 +490,7 @@
</li>
<li><a href="reference.html#palace.MessageHandler.source_force_stopped">source_force_stopped() (palace.MessageHandler method)</a>
</li>
<li><a href="reference.html#palace.AuxiliaryEffectSlot.source_sends">source_sends() (palace.AuxiliaryEffectSlot property)</a>
<li><a href="reference.html#palace.Effect.source_sends">source_sends() (palace.Effect property)</a>
</li>
<li><a href="reference.html#palace.MessageHandler.source_stopped">source_stopped() (palace.MessageHandler method)</a>
</li>
@ -566,7 +538,7 @@
</li>
</ul></td>
<td style="width: 33%; vertical-align: top;"><ul>
<li><a href="reference.html#palace.AuxiliaryEffectSlot.use_count">use_count() (palace.AuxiliaryEffectSlot property)</a>
<li><a href="reference.html#palace.Effect.use_count">use_count() (palace.Effect property)</a>
</li>
<li><a href="reference.html#palace.use_fileio">use_fileio() (in module palace)</a>
</li>
@ -576,12 +548,10 @@
<h2 id="V">V</h2>
<table style="width: 100%" class="indextable genindextable"><tr>
<td style="width: 33%; vertical-align: top;"><ul>
<li><a href="reference.html#palace.Vector3">Vector3 (in module palace)</a>
<li><a href="reference.html#palace.Source.velocity">velocity (palace.Source attribute)</a>
</li>
</ul></td>
<td style="width: 33%; vertical-align: top;"><ul>
<li><a href="reference.html#palace.Source.velocity">velocity (palace.Source attribute)</a>
</li>
<li><a href="reference.html#palace.Listener.velocity">velocity() (palace.Listener property)</a>
</li>
</ul></td>
@ -608,8 +578,8 @@
<p class="caption"><span class="caption-text">Contents:</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="installation.html">Installation</a></li>
<li class="toctree-l1"><a class="reference internal" href="design.html">Design Principles</a></li>
<li class="toctree-l1"><a class="reference internal" href="reference.html">Reference</a></li>
<li class="toctree-l1"><a class="reference internal" href="design.html">Design Principles</a></li>
</ul>
<div class="relations">
@ -645,7 +615,7 @@
&copy;2019, 2020 Nguyễn Gia Phong et al.
|
Powered by <a href="http://sphinx-doc.org/">Sphinx 3.0.0+/4e6f8bc</a>
Powered by <a href="http://sphinx-doc.org/">Sphinx 3.0.1</a>
&amp; <a href="https://github.com/bitprophet/alabaster">Alabaster 0.7.12</a>
</div>

View File

@ -1,10 +1,10 @@
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<html>
<head>
<meta charset="utf-8" />
<title>Welcome to our palace! &#8212; palace 0.1.0 documentation</title>
<title>Welcome to our palace! &#8212; palace 0.1.3 documentation</title>
<link rel="stylesheet" href="_static/alabaster.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<script id="documentation_options" data-url_root="./" src="_static/documentation_options.js"></script>
@ -42,14 +42,22 @@
<li class="toctree-l2"><a class="reference internal" href="installation.html#from-source">From source</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="reference.html">Reference</a><ul>
<li class="toctree-l2"><a class="reference internal" href="reference.html#audio-devices">Audio Devices</a></li>
<li class="toctree-l2"><a class="reference internal" href="reference.html#audio-library-contexts">Audio Library Contexts</a></li>
<li class="toctree-l2"><a class="reference internal" href="reference.html#resource-caching">Resource Caching</a></li>
<li class="toctree-l2"><a class="reference internal" href="reference.html#sources-source-groups">Sources &amp; Source Groups</a></li>
<li class="toctree-l2"><a class="reference internal" href="reference.html#environmental-effects">Environmental Effects</a></li>
<li class="toctree-l2"><a class="reference internal" href="reference.html#decoder-interface">Decoder Interface</a></li>
<li class="toctree-l2"><a class="reference internal" href="reference.html#file-i-o-interface">File I/O Interface</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="design.html">Design Principles</a><ul>
<li class="toctree-l2"><a class="reference internal" href="design.html#project-overview">Project Overview</a></li>
<li class="toctree-l2"><a class="reference internal" href="design.html#the-impl-idiom">The Impl Idiom</a></li>
<li class="toctree-l2"><a class="reference internal" href="design.html#the-modern-python">The Modern Python</a></li>
<li class="toctree-l2"><a class="reference internal" href="design.html#the-double-reference">The Double Reference</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="reference.html">Reference</a></li>
</ul>
</div>
</div>
@ -82,8 +90,8 @@
<p class="caption"><span class="caption-text">Contents:</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="installation.html">Installation</a></li>
<li class="toctree-l1"><a class="reference internal" href="design.html">Design Principles</a></li>
<li class="toctree-l1"><a class="reference internal" href="reference.html">Reference</a></li>
<li class="toctree-l1"><a class="reference internal" href="design.html">Design Principles</a></li>
</ul>
<div class="relations">
@ -120,7 +128,7 @@
&copy;2019, 2020 Nguyễn Gia Phong et al.
|
Powered by <a href="http://sphinx-doc.org/">Sphinx 3.0.0+/4e6f8bc</a>
Powered by <a href="http://sphinx-doc.org/">Sphinx 3.0.1</a>
&amp; <a href="https://github.com/bitprophet/alabaster">Alabaster 0.7.12</a>
|

View File

@ -1,10 +1,10 @@
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<html>
<head>
<meta charset="utf-8" />
<title>Installation &#8212; palace 0.1.0 documentation</title>
<title>Installation &#8212; palace 0.1.3 documentation</title>
<link rel="stylesheet" href="_static/alabaster.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<script id="documentation_options" data-url_root="./" src="_static/documentation_options.js"></script>
@ -14,7 +14,7 @@
<script src="_static/language_data.js"></script>
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="search.html" />
<link rel="next" title="Design Principles" href="design.html" />
<link rel="next" title="Reference" href="reference.html" />
<link rel="prev" title="Welcome to our palace!" href="index.html" />
<link rel="stylesheet" href="_static/custom.css" type="text/css" />
@ -89,8 +89,8 @@ pip install palace/
<li class="toctree-l2"><a class="reference internal" href="#from-source">From source</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="design.html">Design Principles</a></li>
<li class="toctree-l1"><a class="reference internal" href="reference.html">Reference</a></li>
<li class="toctree-l1"><a class="reference internal" href="design.html">Design Principles</a></li>
</ul>
<div class="relations">
@ -98,7 +98,7 @@ pip install palace/
<ul>
<li><a href="index.html">Documentation overview</a><ul>
<li>Previous: <a href="index.html" title="previous chapter">Welcome to our palace!</a></li>
<li>Next: <a href="design.html" title="next chapter">Design Principles</a></li>
<li>Next: <a href="reference.html" title="next chapter">Reference</a></li>
</ul></li>
</ul>
</div>
@ -128,7 +128,7 @@ pip install palace/
&copy;2019, 2020 Nguyễn Gia Phong et al.
|
Powered by <a href="http://sphinx-doc.org/">Sphinx 3.0.0+/4e6f8bc</a>
Powered by <a href="http://sphinx-doc.org/">Sphinx 3.0.1</a>
&amp; <a href="https://github.com/bitprophet/alabaster">Alabaster 0.7.12</a>
|

Binary file not shown.

View File

@ -112,7 +112,7 @@
&copy;2019, 2020 Nguyễn Gia Phong et al.
|
Powered by <a href="http://sphinx-doc.org/">Sphinx 3.0.0+/4e6f8bc</a>
Powered by <a href="http://sphinx-doc.org/">Sphinx 3.0.0+/d21cb1f</a>
&amp; <a href="https://github.com/bitprophet/alabaster">Alabaster 0.7.12</a>
</div>

File diff suppressed because it is too large Load Diff

View File

@ -1,10 +1,10 @@
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<html>
<head>
<meta charset="utf-8" />
<title>Search &#8212; palace 0.1.0 documentation</title>
<title>Search &#8212; palace 0.1.3 documentation</title>
<link rel="stylesheet" href="_static/alabaster.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
@ -76,8 +76,8 @@
<p class="caption"><span class="caption-text">Contents:</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="installation.html">Installation</a></li>
<li class="toctree-l1"><a class="reference internal" href="design.html">Design Principles</a></li>
<li class="toctree-l1"><a class="reference internal" href="reference.html">Reference</a></li>
<li class="toctree-l1"><a class="reference internal" href="design.html">Design Principles</a></li>
</ul>
<div class="relations">
@ -103,7 +103,7 @@
&copy;2019, 2020 Nguyễn Gia Phong et al.
|
Powered by <a href="http://sphinx-doc.org/">Sphinx 3.0.0+/4e6f8bc</a>
Powered by <a href="http://sphinx-doc.org/">Sphinx 3.0.1</a>
&amp; <a href="https://github.com/bitprophet/alabaster">Alabaster 0.7.12</a>
</div>

File diff suppressed because one or more lines are too long

View File

@ -22,7 +22,7 @@ copyright = '2019, 2020 Nguyễn Gia Phong et al'
author = 'Nguyễn Gia Phong et al.'
# The full version, including alpha/beta/rc tags
release = '0.1.0'
release = '0.1.3'
# -- General configuration ---------------------------------------------------
@ -32,6 +32,9 @@ release = '0.1.0'
# ones.
extensions = ['sphinx.ext.autodoc', 'sphinx.ext.napoleon']
napoleon_google_docstring = False
napoleon_use_ivar = True
# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']

View File

@ -10,28 +10,6 @@ Cython, Python and C++11.
.. _alure: https://github.com/kcat/alure
Project Overview
----------------
Before diving into the design, here is a brief overview of the functionalities
provided by palace:
#. Audio device creation and auxiliary functionalities:
:py:const:`palace.device_names`, :py:func:`palace.query_extension`
and :py:class:`palace.Device`
#. Context creation and management: :py:func:`palace.current_context`,
:py:func:`palace.use_context`, :py:class:`palace.Context`,
:py:class:`palace.Listener` and :py:class:`palace.MessageHandler`
#. Creation and caching of internal audio decoders and user-defined ones:
:py:class:`palace.Decoder`, :py:class:`palace.BaseDecoder`,
:py:data:`palace.decoder_factories`, :py:class:`palace.FileIO`,
:py:func:`palace.current_fileio`, :py:func:`palace.use_fileio`
and :py:class:`palace.Buffer`
#. Source of audio playback: :py:class:`palace.Source`
and :py:class:`palace.SourceGroup`
#. Audio effect: :py:class:`palace.AuxiliaryEffectSlot`
and :py:class:`palace.Effect`
.. _impl-idiom:
The Impl Idiom

View File

@ -6,8 +6,8 @@ Welcome to our palace!
:caption: Contents:
installation
design
reference
design
Indices and tables

View File

@ -1,5 +1,165 @@
Reference
=========
.. automodule:: palace
.. currentmodule:: palace
Audio Devices
-------------
.. data:: device_names
:type: DeviceNames
Read-only namespace of device names by category (``basic``, ``full`` and
``capture``), as tuples of strings whose first item being the default.
.. autofunction:: query_extension
.. autoclass:: Device
:members:
Audio Library Contexts
----------------------
.. data:: CHANNEL_CONFIG
:type: int
Context creation key to specify the channel configuration
(either ``MONO``, ``STEREO``, ``QUAD``, ``X51``, ``X61`` or ``X71``).
.. data:: SAMPLE_TYPE
:type: int
Context creation key to specify the sample type
(either ``[UNSIGNED_]{BYTE,SHORT,INT}`` or ``FLOAT``).
.. data:: FREQUENCY
:type: int
Context creation key to specify the frequency in hertz.
.. data:: MONO_SOURCES
:type: int
Context creation key to specify the number of mono (3D) sources.
.. data:: STEREO_SOURCES
:type: int
Context creation key to specify the number of stereo sources.
.. data:: MAX_AUXILIARY_SENDS
:type: int
Context creation key to specify the maximum number of
auxiliary source sends.
.. data:: HRTF
:type: int
Context creation key to specify whether to enable HRTF
(either ``FALSE``, ``TRUE`` or ``DONT_CARE``).
.. data:: HRTF_ID
:type: int
Context creation key to specify the HRTF to be used.
.. data:: OUTPUT_LIMITER
:type: int
Context creation key to specify whether to use a gain limiter
(either ``FALSE``, ``TRUE`` or ``DONT_CARE``).
.. data:: distance_models
:type: Tuple[str, ...]
Names of available distance models.
.. autofunction:: thread_local
.. autofunction:: current_context
.. autofunction:: use_context
.. autoclass:: Context
:members:
.. autoclass:: Listener
:members:
.. autoclass:: MessageHandler
:members:
Resource Caching
----------------
.. autofunction:: cache
.. autofunction:: free
.. autoclass:: Buffer
:members:
Sources & Source Groups
-----------------------
.. autoclass:: Source
:members:
.. autoclass:: SourceGroup
:members:
Environmental Effects
---------------------
.. data:: reverb_preset_names
:type: Tuple[str, ...]
Names of predefined reverb effect presets in lexicographical order.
.. autoclass:: Effect
:members:
Decoder Interface
-----------------
.. data:: sample_types
:type: Tuple[str, ...]
Names of available sample types.
.. data:: channel_configs
:type: Tuple[str, ...]
Names of available channel configurations.
.. data:: decoder_factories
:type: DecoderNamespace
Simple object for storing decoder factories.
User-registered factories are tried one after another
if :py:exc:`RuntimeError` is raised, in lexicographical order.
Internal decoder factories are always used after registered ones.
.. autofunction:: decode
.. autofunction:: sample_size
.. autofunction:: sample_length
.. autoclass:: Decoder
:members:
.. autoclass:: BaseDecoder
:members:
File I/O Interface
------------------
.. autofunction:: current_fileio
.. autofunction:: use_fileio
.. autoclass:: FileIO
:members: