mirror of
https://github.com/larsimmisch/pyalsaaudio.git
synced 2026-06-01 10:57:01 +00:00
Version 0.9.1
This commit is contained in:
+85
-34
@@ -4,7 +4,7 @@
|
||||
*
|
||||
* Sphinx stylesheet -- basic theme.
|
||||
*
|
||||
* :copyright: Copyright 2007-2020 by the Sphinx team, see AUTHORS.
|
||||
* :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS.
|
||||
* :license: BSD, see LICENSE for details.
|
||||
*
|
||||
*/
|
||||
@@ -130,7 +130,7 @@ ul.search li a {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
ul.search li div.context {
|
||||
ul.search li p.context {
|
||||
color: #888;
|
||||
margin: 2px 0 0 30px;
|
||||
text-align: left;
|
||||
@@ -277,25 +277,25 @@ p.rubric {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
img.align-left, .figure.align-left, object.align-left {
|
||||
img.align-left, figure.align-left, .figure.align-left, object.align-left {
|
||||
clear: left;
|
||||
float: left;
|
||||
margin-right: 1em;
|
||||
}
|
||||
|
||||
img.align-right, .figure.align-right, object.align-right {
|
||||
img.align-right, figure.align-right, .figure.align-right, object.align-right {
|
||||
clear: right;
|
||||
float: right;
|
||||
margin-left: 1em;
|
||||
}
|
||||
|
||||
img.align-center, .figure.align-center, object.align-center {
|
||||
img.align-center, figure.align-center, .figure.align-center, object.align-center {
|
||||
display: block;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
}
|
||||
|
||||
img.align-default, .figure.align-default {
|
||||
img.align-default, figure.align-default, .figure.align-default {
|
||||
display: block;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
@@ -319,7 +319,8 @@ img.align-default, .figure.align-default {
|
||||
|
||||
/* -- sidebars -------------------------------------------------------------- */
|
||||
|
||||
div.sidebar {
|
||||
div.sidebar,
|
||||
aside.sidebar {
|
||||
margin: 0 0 0.5em 1em;
|
||||
border: 1px solid #ddb;
|
||||
padding: 7px;
|
||||
@@ -377,12 +378,14 @@ div.body p.centered {
|
||||
/* -- content of sidebars/topics/admonitions -------------------------------- */
|
||||
|
||||
div.sidebar > :last-child,
|
||||
aside.sidebar > :last-child,
|
||||
div.topic > :last-child,
|
||||
div.admonition > :last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
div.sidebar::after,
|
||||
aside.sidebar::after,
|
||||
div.topic::after,
|
||||
div.admonition::after,
|
||||
blockquote::after {
|
||||
@@ -455,20 +458,22 @@ td > :last-child {
|
||||
|
||||
/* -- figures --------------------------------------------------------------- */
|
||||
|
||||
div.figure {
|
||||
div.figure, figure {
|
||||
margin: 0.5em;
|
||||
padding: 0.5em;
|
||||
}
|
||||
|
||||
div.figure p.caption {
|
||||
div.figure p.caption, figcaption {
|
||||
padding: 0.3em;
|
||||
}
|
||||
|
||||
div.figure p.caption span.caption-number {
|
||||
div.figure p.caption span.caption-number,
|
||||
figcaption span.caption-number {
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
div.figure p.caption span.caption-text {
|
||||
div.figure p.caption span.caption-text,
|
||||
figcaption span.caption-text {
|
||||
}
|
||||
|
||||
/* -- field list styles ----------------------------------------------------- */
|
||||
@@ -503,6 +508,63 @@ table.hlist td {
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
/* -- object description styles --------------------------------------------- */
|
||||
|
||||
.sig {
|
||||
font-family: 'Consolas', 'Menlo', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', monospace;
|
||||
}
|
||||
|
||||
.sig-name, code.descname {
|
||||
background-color: transparent;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.sig-name {
|
||||
font-size: 1.1em;
|
||||
}
|
||||
|
||||
code.descname {
|
||||
font-size: 1.2em;
|
||||
}
|
||||
|
||||
.sig-prename, code.descclassname {
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
.optional {
|
||||
font-size: 1.3em;
|
||||
}
|
||||
|
||||
.sig-paren {
|
||||
font-size: larger;
|
||||
}
|
||||
|
||||
.sig-param.n {
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
/* C++ specific styling */
|
||||
|
||||
.sig-inline.c-texpr,
|
||||
.sig-inline.cpp-texpr {
|
||||
font-family: unset;
|
||||
}
|
||||
|
||||
.sig.c .k, .sig.c .kt,
|
||||
.sig.cpp .k, .sig.cpp .kt {
|
||||
color: #0033B3;
|
||||
}
|
||||
|
||||
.sig.c .m,
|
||||
.sig.cpp .m {
|
||||
color: #1750EB;
|
||||
}
|
||||
|
||||
.sig.c .s, .sig.c .sc,
|
||||
.sig.cpp .s, .sig.cpp .sc {
|
||||
color: #067D17;
|
||||
}
|
||||
|
||||
|
||||
/* -- other body styles ----------------------------------------------------- */
|
||||
|
||||
@@ -629,14 +691,6 @@ dl.glossary dt {
|
||||
font-size: 1.1em;
|
||||
}
|
||||
|
||||
.optional {
|
||||
font-size: 1.3em;
|
||||
}
|
||||
|
||||
.sig-paren {
|
||||
font-size: larger;
|
||||
}
|
||||
|
||||
.versionmodified {
|
||||
font-style: italic;
|
||||
}
|
||||
@@ -677,8 +731,9 @@ dl.glossary dt {
|
||||
|
||||
.classifier:before {
|
||||
font-style: normal;
|
||||
margin: 0.5em;
|
||||
margin: 0 0.5em;
|
||||
content: ":";
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
abbr, acronym {
|
||||
@@ -693,7 +748,7 @@ pre {
|
||||
overflow-y: hidden; /* fixes display issues on Chrome browsers */
|
||||
}
|
||||
|
||||
pre, div[class|="highlight"] {
|
||||
pre, div[class*="highlight-"] {
|
||||
clear: both;
|
||||
}
|
||||
|
||||
@@ -702,9 +757,10 @@ span.pre {
|
||||
-ms-hyphens: none;
|
||||
-webkit-hyphens: none;
|
||||
hyphens: none;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
div[class^="highlight-"] {
|
||||
div[class*="highlight-"] {
|
||||
margin: 1em 0;
|
||||
}
|
||||
|
||||
@@ -764,8 +820,13 @@ div.code-block-caption code {
|
||||
}
|
||||
|
||||
table.highlighttable td.linenos,
|
||||
div.doctest > div.highlight span.gp { /* gp: Generic.Prompt */
|
||||
user-select: none;
|
||||
span.linenos,
|
||||
div.highlight span.gp { /* gp: Generic.Prompt */
|
||||
user-select: none;
|
||||
-webkit-user-select: text; /* Safari fallback only */
|
||||
-webkit-user-select: none; /* Chrome/Safari */
|
||||
-moz-user-select: none; /* Firefox */
|
||||
-ms-user-select: none; /* IE10+ */
|
||||
}
|
||||
|
||||
div.code-block-caption span.caption-number {
|
||||
@@ -780,16 +841,6 @@ div.literal-block-wrapper {
|
||||
margin: 1em 0;
|
||||
}
|
||||
|
||||
code.descname {
|
||||
background-color: transparent;
|
||||
font-weight: bold;
|
||||
font-size: 1.2em;
|
||||
}
|
||||
|
||||
code.descclassname {
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
code.xref, a code {
|
||||
background-color: transparent;
|
||||
font-weight: bold;
|
||||
|
||||
+63
-20
@@ -4,7 +4,7 @@
|
||||
*
|
||||
* Sphinx JavaScript utilities for all documentation.
|
||||
*
|
||||
* :copyright: Copyright 2007-2020 by the Sphinx team, see AUTHORS.
|
||||
* :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS.
|
||||
* :license: BSD, see LICENSE for details.
|
||||
*
|
||||
*/
|
||||
@@ -29,9 +29,14 @@ if (!window.console || !console.firebug) {
|
||||
|
||||
/**
|
||||
* small helper function to urldecode strings
|
||||
*
|
||||
* See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/decodeURIComponent#Decoding_query_parameters_from_a_URL
|
||||
*/
|
||||
jQuery.urldecode = function(x) {
|
||||
return decodeURIComponent(x).replace(/\+/g, ' ');
|
||||
if (!x) {
|
||||
return x
|
||||
}
|
||||
return decodeURIComponent(x.replace(/\+/g, ' '));
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -149,9 +154,7 @@ var Documentation = {
|
||||
this.fixFirefoxAnchorBug();
|
||||
this.highlightSearchWords();
|
||||
this.initIndexTable();
|
||||
if (DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS) {
|
||||
this.initOnKeyListeners();
|
||||
}
|
||||
this.initOnKeyListeners();
|
||||
},
|
||||
|
||||
/**
|
||||
@@ -259,6 +262,16 @@ var Documentation = {
|
||||
hideSearchWords : function() {
|
||||
$('#searchbox .highlight-link').fadeOut(300);
|
||||
$('span.highlighted').removeClass('highlighted');
|
||||
var url = new URL(window.location);
|
||||
url.searchParams.delete('highlight');
|
||||
window.history.replaceState({}, '', url);
|
||||
},
|
||||
|
||||
/**
|
||||
* helper function to focus on search bar
|
||||
*/
|
||||
focusSearchBar : function() {
|
||||
$('input[name=q]').first().focus();
|
||||
},
|
||||
|
||||
/**
|
||||
@@ -283,24 +296,54 @@ var Documentation = {
|
||||
},
|
||||
|
||||
initOnKeyListeners: function() {
|
||||
// only install a listener if it is really needed
|
||||
if (!DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS &&
|
||||
!DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS)
|
||||
return;
|
||||
|
||||
$(document).keydown(function(event) {
|
||||
var activeElementType = document.activeElement.tagName;
|
||||
// don't navigate when in search box or textarea
|
||||
// don't navigate when in search box, textarea, dropdown or button
|
||||
if (activeElementType !== 'TEXTAREA' && activeElementType !== 'INPUT' && activeElementType !== 'SELECT'
|
||||
&& !event.altKey && !event.ctrlKey && !event.metaKey && !event.shiftKey) {
|
||||
switch (event.keyCode) {
|
||||
case 37: // left
|
||||
var prevHref = $('link[rel="prev"]').prop('href');
|
||||
if (prevHref) {
|
||||
window.location.href = prevHref;
|
||||
return false;
|
||||
}
|
||||
case 39: // right
|
||||
var nextHref = $('link[rel="next"]').prop('href');
|
||||
if (nextHref) {
|
||||
window.location.href = nextHref;
|
||||
return false;
|
||||
}
|
||||
&& activeElementType !== 'BUTTON') {
|
||||
if (event.altKey || event.ctrlKey || event.metaKey)
|
||||
return;
|
||||
|
||||
if (!event.shiftKey) {
|
||||
switch (event.key) {
|
||||
case 'ArrowLeft':
|
||||
if (!DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS)
|
||||
break;
|
||||
var prevHref = $('link[rel="prev"]').prop('href');
|
||||
if (prevHref) {
|
||||
window.location.href = prevHref;
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
case 'ArrowRight':
|
||||
if (!DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS)
|
||||
break;
|
||||
var nextHref = $('link[rel="next"]').prop('href');
|
||||
if (nextHref) {
|
||||
window.location.href = nextHref;
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
case 'Escape':
|
||||
if (!DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS)
|
||||
break;
|
||||
Documentation.hideSearchWords();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// some keyboard layouts may need Shift to get /
|
||||
switch (event.key) {
|
||||
case '/':
|
||||
if (!DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS)
|
||||
break;
|
||||
Documentation.focusSearchBar();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
@@ -1,5 +1,10 @@
|
||||
pre { line-height: 125%; margin: 0; }
|
||||
td.linenos pre { color: #000000; background-color: #f0f0f0; padding: 0 5px 0 5px; }
|
||||
span.linenos { color: #000000; background-color: #f0f0f0; padding: 0 5px 0 5px; }
|
||||
td.linenos pre.special { color: #000000; background-color: #ffffc0; padding: 0 5px 0 5px; }
|
||||
span.linenos.special { color: #000000; background-color: #ffffc0; padding: 0 5px 0 5px; }
|
||||
.highlight .hll { background-color: #ffffcc }
|
||||
.highlight { background: #eeffcc; }
|
||||
.highlight { background: #eeffcc; }
|
||||
.highlight .c { color: #408090; font-style: italic } /* Comment */
|
||||
.highlight .err { border: 1px solid #FF0000 } /* Error */
|
||||
.highlight .k { color: #007020; font-weight: bold } /* Keyword */
|
||||
|
||||
+36
-26
@@ -4,7 +4,7 @@
|
||||
*
|
||||
* Sphinx JavaScript utilities for the full-text search.
|
||||
*
|
||||
* :copyright: Copyright 2007-2020 by the Sphinx team, see AUTHORS.
|
||||
* :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS.
|
||||
* :license: BSD, see LICENSE for details.
|
||||
*
|
||||
*/
|
||||
@@ -59,10 +59,10 @@ var Search = {
|
||||
_pulse_status : -1,
|
||||
|
||||
htmlToText : function(htmlString) {
|
||||
var htmlElement = document.createElement('span');
|
||||
htmlElement.innerHTML = htmlString;
|
||||
$(htmlElement).find('.headerlink').remove();
|
||||
docContent = $(htmlElement).find('[role=main]')[0];
|
||||
var virtualDocument = document.implementation.createHTMLDocument('virtual');
|
||||
var htmlElement = $(htmlString, virtualDocument);
|
||||
htmlElement.find('.headerlink').remove();
|
||||
docContent = htmlElement.find('[role=main]')[0];
|
||||
if(docContent === undefined) {
|
||||
console.warn("Content block not found. Sphinx search tries to obtain it " +
|
||||
"via '[role=main]'. Could you check your theme or template.");
|
||||
@@ -166,17 +166,12 @@ var Search = {
|
||||
objectterms.push(tmp[i].toLowerCase());
|
||||
}
|
||||
|
||||
if ($u.indexOf(stopwords, tmp[i].toLowerCase()) != -1 || tmp[i].match(/^\d+$/) ||
|
||||
tmp[i] === "") {
|
||||
if ($u.indexOf(stopwords, tmp[i].toLowerCase()) != -1 || tmp[i] === "") {
|
||||
// skip this "word"
|
||||
continue;
|
||||
}
|
||||
// stem the word
|
||||
var word = stemmer.stemWord(tmp[i].toLowerCase());
|
||||
// prevent stemmer from cutting word smaller than two chars
|
||||
if(word.length < 3 && tmp[i].length >= 3) {
|
||||
word = tmp[i];
|
||||
}
|
||||
var toAppend;
|
||||
// select the correct list
|
||||
if (word[0] == '-') {
|
||||
@@ -249,7 +244,7 @@ var Search = {
|
||||
// results left, load the summary and display it
|
||||
if (results.length) {
|
||||
var item = results.pop();
|
||||
var listItem = $('<li style="display:none"></li>');
|
||||
var listItem = $('<li></li>');
|
||||
var requestUrl = "";
|
||||
var linkUrl = "";
|
||||
if (DOCUMENTATION_OPTIONS.BUILDER === 'dirhtml') {
|
||||
@@ -274,28 +269,31 @@ var Search = {
|
||||
if (item[3]) {
|
||||
listItem.append($('<span> (' + item[3] + ')</span>'));
|
||||
Search.output.append(listItem);
|
||||
listItem.slideDown(5, function() {
|
||||
setTimeout(function() {
|
||||
displayNextItem();
|
||||
});
|
||||
} else if (DOCUMENTATION_OPTIONS.HAS_SOURCE) {
|
||||
}, 5);
|
||||
} else if (DOCUMENTATION_OPTIONS.SHOW_SEARCH_SUMMARY) {
|
||||
$.ajax({url: requestUrl,
|
||||
dataType: "text",
|
||||
complete: function(jqxhr, textstatus) {
|
||||
var data = jqxhr.responseText;
|
||||
if (data !== '' && data !== undefined) {
|
||||
listItem.append(Search.makeSearchSummary(data, searchterms, hlterms));
|
||||
var summary = Search.makeSearchSummary(data, searchterms, hlterms);
|
||||
if (summary) {
|
||||
listItem.append(summary);
|
||||
}
|
||||
}
|
||||
Search.output.append(listItem);
|
||||
listItem.slideDown(5, function() {
|
||||
setTimeout(function() {
|
||||
displayNextItem();
|
||||
});
|
||||
}, 5);
|
||||
}});
|
||||
} else {
|
||||
// no source available, just display title
|
||||
// just display title
|
||||
Search.output.append(listItem);
|
||||
listItem.slideDown(5, function() {
|
||||
setTimeout(function() {
|
||||
displayNextItem();
|
||||
});
|
||||
}, 5);
|
||||
}
|
||||
}
|
||||
// search finished, update title and status message
|
||||
@@ -326,7 +324,9 @@ var Search = {
|
||||
var results = [];
|
||||
|
||||
for (var prefix in objects) {
|
||||
for (var name in objects[prefix]) {
|
||||
for (var iMatch = 0; iMatch != objects[prefix].length; ++iMatch) {
|
||||
var match = objects[prefix][iMatch];
|
||||
var name = match[4];
|
||||
var fullname = (prefix ? prefix + '.' : '') + name;
|
||||
var fullnameLower = fullname.toLowerCase()
|
||||
if (fullnameLower.indexOf(object) > -1) {
|
||||
@@ -340,7 +340,6 @@ var Search = {
|
||||
} else if (parts[parts.length - 1].indexOf(object) > -1) {
|
||||
score += Scorer.objPartialMatch;
|
||||
}
|
||||
var match = objects[prefix][name];
|
||||
var objname = objnames[match[1]][2];
|
||||
var title = titles[match[0]];
|
||||
// If more than one term searched for, we require other words to be
|
||||
@@ -380,6 +379,13 @@ var Search = {
|
||||
return results;
|
||||
},
|
||||
|
||||
/**
|
||||
* See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions
|
||||
*/
|
||||
escapeRegExp : function(string) {
|
||||
return string.replace(/[.*+\-?^${}()|[\]\\]/g, '\\$&'); // $& means the whole matched string
|
||||
},
|
||||
|
||||
/**
|
||||
* search for full-text terms in the index
|
||||
*/
|
||||
@@ -403,13 +409,14 @@ var Search = {
|
||||
];
|
||||
// add support for partial matches
|
||||
if (word.length > 2) {
|
||||
var word_regex = this.escapeRegExp(word);
|
||||
for (var w in terms) {
|
||||
if (w.match(word) && !terms[word]) {
|
||||
if (w.match(word_regex) && !terms[word]) {
|
||||
_o.push({files: terms[w], score: Scorer.partialTerm})
|
||||
}
|
||||
}
|
||||
for (var w in titleterms) {
|
||||
if (w.match(word) && !titleterms[word]) {
|
||||
if (w.match(word_regex) && !titleterms[word]) {
|
||||
_o.push({files: titleterms[w], score: Scorer.partialTitle})
|
||||
}
|
||||
}
|
||||
@@ -491,6 +498,9 @@ var Search = {
|
||||
*/
|
||||
makeSearchSummary : function(htmlText, keywords, hlwords) {
|
||||
var text = Search.htmlToText(htmlText);
|
||||
if (text == "") {
|
||||
return null;
|
||||
}
|
||||
var textLower = text.toLowerCase();
|
||||
var start = 0;
|
||||
$.each(keywords, function() {
|
||||
@@ -502,7 +512,7 @@ var Search = {
|
||||
var excerpt = ((start > 0) ? '...' : '') +
|
||||
$.trim(text.substr(start, 240)) +
|
||||
((start + 240 - text.length) ? '...' : '');
|
||||
var rv = $('<div class="context"></div>').text(excerpt);
|
||||
var rv = $('<p class="context"></p>').text(excerpt);
|
||||
$.each(hlwords, function() {
|
||||
rv = rv.highlightText(this, 'highlighted');
|
||||
});
|
||||
|
||||
+6
-31
File diff suppressed because one or more lines are too long
+28
-13
@@ -4,15 +4,14 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Index — alsaaudio documentation 0.9.0 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>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>Index — alsaaudio documentation 0.9.1 documentation</title>
|
||||
<link rel="stylesheet" type="text/css" href="_static/pygments.css" />
|
||||
<link rel="stylesheet" type="text/css" href="_static/alabaster.css" />
|
||||
<script data-url_root="./" id="documentation_options" src="_static/documentation_options.js"></script>
|
||||
<script src="_static/jquery.js"></script>
|
||||
<script src="_static/underscore.js"></script>
|
||||
<script src="_static/doctools.js"></script>
|
||||
<script src="_static/language_data.js"></script>
|
||||
<link rel="index" title="Index" href="#" />
|
||||
<link rel="search" title="Search" href="search.html" />
|
||||
|
||||
@@ -58,6 +57,10 @@
|
||||
</li>
|
||||
</ul></li>
|
||||
</ul></td>
|
||||
<td style="width: 33%; vertical-align: top;"><ul>
|
||||
<li><a href="libalsaaudio.html#alsaaudio.asoundlib_version">asoundlib_version() (in module alsaaudio)</a>
|
||||
</li>
|
||||
</ul></td>
|
||||
</tr></table>
|
||||
|
||||
<h2 id="C">C</h2>
|
||||
@@ -79,12 +82,16 @@
|
||||
<h2 id="G">G</h2>
|
||||
<table style="width: 100%" class="indextable genindextable"><tr>
|
||||
<td style="width: 33%; vertical-align: top;"><ul>
|
||||
<li><a href="libalsaaudio.html#alsaaudio.Mixer.getenum">getenum() (alsaaudio.Mixer method)</a>
|
||||
<li><a href="libalsaaudio.html#alsaaudio.PCM.get_tstamp_mode">get_tstamp_mode() (alsaaudio.PCM method)</a>
|
||||
</li>
|
||||
<li><a href="libalsaaudio.html#alsaaudio.Mixer.getmute">getmute() (alsaaudio.Mixer method)</a>
|
||||
<li><a href="libalsaaudio.html#alsaaudio.PCM.get_tstamp_type">get_tstamp_type() (alsaaudio.PCM method)</a>
|
||||
</li>
|
||||
<li><a href="libalsaaudio.html#alsaaudio.Mixer.getenum">getenum() (alsaaudio.Mixer method)</a>
|
||||
</li>
|
||||
</ul></td>
|
||||
<td style="width: 33%; vertical-align: top;"><ul>
|
||||
<li><a href="libalsaaudio.html#alsaaudio.Mixer.getmute">getmute() (alsaaudio.Mixer method)</a>
|
||||
</li>
|
||||
<li><a href="libalsaaudio.html#alsaaudio.Mixer.getrange">getrange() (alsaaudio.Mixer method)</a>
|
||||
</li>
|
||||
<li><a href="libalsaaudio.html#alsaaudio.Mixer.getrec">getrec() (alsaaudio.Mixer method)</a>
|
||||
@@ -98,6 +105,10 @@
|
||||
<table style="width: 100%" class="indextable genindextable"><tr>
|
||||
<td style="width: 33%; vertical-align: top;"><ul>
|
||||
<li><a href="libalsaaudio.html#alsaaudio.Mixer.handleevents">handleevents() (alsaaudio.Mixer method)</a>
|
||||
</li>
|
||||
</ul></td>
|
||||
<td style="width: 33%; vertical-align: top;"><ul>
|
||||
<li><a href="libalsaaudio.html#alsaaudio.PCM.htimestamp">htimestamp() (alsaaudio.PCM method)</a>
|
||||
</li>
|
||||
</ul></td>
|
||||
</tr></table>
|
||||
@@ -160,16 +171,20 @@
|
||||
<h2 id="S">S</h2>
|
||||
<table style="width: 100%" class="indextable genindextable"><tr>
|
||||
<td style="width: 33%; vertical-align: top;"><ul>
|
||||
<li><a href="libalsaaudio.html#alsaaudio.PCM.set_tstamp_mode">set_tstamp_mode() (alsaaudio.PCM method)</a>
|
||||
</li>
|
||||
<li><a href="libalsaaudio.html#alsaaudio.PCM.set_tstamp_type">set_tstamp_type() (alsaaudio.PCM method)</a>
|
||||
</li>
|
||||
<li><a href="libalsaaudio.html#alsaaudio.PCM.setchannels">setchannels() (alsaaudio.PCM method)</a>
|
||||
</li>
|
||||
<li><a href="libalsaaudio.html#alsaaudio.PCM.setformat">setformat() (alsaaudio.PCM method)</a>
|
||||
</li>
|
||||
<li><a href="libalsaaudio.html#alsaaudio.Mixer.setmute">setmute() (alsaaudio.Mixer method)</a>
|
||||
</li>
|
||||
<li><a href="libalsaaudio.html#alsaaudio.PCM.setperiodsize">setperiodsize() (alsaaudio.PCM method)</a>
|
||||
</li>
|
||||
</ul></td>
|
||||
<td style="width: 33%; vertical-align: top;"><ul>
|
||||
<li><a href="libalsaaudio.html#alsaaudio.PCM.setperiodsize">setperiodsize() (alsaaudio.PCM method)</a>
|
||||
</li>
|
||||
<li><a href="libalsaaudio.html#alsaaudio.PCM.setrate">setrate() (alsaaudio.PCM method)</a>
|
||||
</li>
|
||||
<li><a href="libalsaaudio.html#alsaaudio.Mixer.setrec">setrec() (alsaaudio.Mixer method)</a>
|
||||
@@ -215,7 +230,7 @@
|
||||
|
||||
|
||||
<h3>Navigation</h3>
|
||||
<p class="caption"><span class="caption-text">Contents:</span></p>
|
||||
<p class="caption" role="heading"><span class="caption-text">Contents:</span></p>
|
||||
<ul>
|
||||
<li class="toctree-l1"><a class="reference internal" href="pyalsaaudio.html">Introduction</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="pyalsaaudio.html#what-is-alsa">What is ALSA</a></li>
|
||||
@@ -236,7 +251,7 @@
|
||||
<h3 id="searchlabel">Quick search</h3>
|
||||
<div class="searchformwrapper">
|
||||
<form class="search" action="search.html" method="get">
|
||||
<input type="text" name="q" aria-labelledby="searchlabel" />
|
||||
<input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
|
||||
<input type="submit" value="Go" />
|
||||
</form>
|
||||
</div>
|
||||
@@ -258,7 +273,7 @@
|
||||
©2017, Lars Immisch & Casper Wilstrup.
|
||||
|
||||
|
|
||||
Powered by <a href="http://sphinx-doc.org/">Sphinx 3.1.2</a>
|
||||
Powered by <a href="http://sphinx-doc.org/">Sphinx 4.5.0</a>
|
||||
& <a href="https://github.com/bitprophet/alabaster">Alabaster 0.7.12</a>
|
||||
|
||||
</div>
|
||||
|
||||
+18
-18
@@ -4,15 +4,15 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>alsaaudio documentation — alsaaudio documentation 0.9.0 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>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="generator" content="Docutils 0.17.1: http://docutils.sourceforge.net/" />
|
||||
|
||||
<title>alsaaudio documentation — alsaaudio documentation 0.9.1 documentation</title>
|
||||
<link rel="stylesheet" type="text/css" href="_static/pygments.css" />
|
||||
<link rel="stylesheet" type="text/css" href="_static/alabaster.css" />
|
||||
<script data-url_root="./" id="documentation_options" src="_static/documentation_options.js"></script>
|
||||
<script src="_static/jquery.js"></script>
|
||||
<script src="_static/underscore.js"></script>
|
||||
<script src="_static/doctools.js"></script>
|
||||
<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="Introduction" href="pyalsaaudio.html" />
|
||||
@@ -32,10 +32,10 @@
|
||||
|
||||
<div class="body" role="main">
|
||||
|
||||
<div class="section" id="alsaaudio-documentation">
|
||||
<section id="alsaaudio-documentation">
|
||||
<h1>alsaaudio documentation<a class="headerlink" href="#alsaaudio-documentation" title="Permalink to this headline">¶</a></h1>
|
||||
<div class="toctree-wrapper compound">
|
||||
<p class="caption"><span class="caption-text">Contents:</span></p>
|
||||
<p class="caption" role="heading"><span class="caption-text">Contents:</span></p>
|
||||
<ul>
|
||||
<li class="toctree-l1"><a class="reference internal" href="pyalsaaudio.html">Introduction</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="pyalsaaudio.html#what-is-alsa">What is ALSA</a><ul>
|
||||
@@ -53,28 +53,28 @@
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="section" id="download">
|
||||
</section>
|
||||
<section id="download">
|
||||
<h1>Download<a class="headerlink" href="#download" title="Permalink to this headline">¶</a></h1>
|
||||
<ul class="simple">
|
||||
<li><p><a class="reference external" href="https://pypi.python.org/pypi/pyalsaaudio">Download from pypi</a></p></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="section" id="github">
|
||||
</section>
|
||||
<section id="github">
|
||||
<h1>Github<a class="headerlink" href="#github" title="Permalink to this headline">¶</a></h1>
|
||||
<ul class="simple">
|
||||
<li><p><a class="reference external" href="https://github.com/larsimmisch/pyalsaaudio/">Repository</a></p></li>
|
||||
<li><p><a class="reference external" href="https://github.com/larsimmisch/pyalsaaudio/issues">Bug tracker</a></p></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="section" id="indices-and-tables">
|
||||
</section>
|
||||
<section id="indices-and-tables">
|
||||
<h1>Indices and tables<a class="headerlink" href="#indices-and-tables" title="Permalink to this headline">¶</a></h1>
|
||||
<ul class="simple">
|
||||
<li><p><a class="reference internal" href="genindex.html"><span class="std std-ref">Index</span></a></p></li>
|
||||
<li><p><a class="reference internal" href="py-modindex.html"><span class="std std-ref">Module Index</span></a></p></li>
|
||||
<li><p><a class="reference internal" href="search.html"><span class="std std-ref">Search Page</span></a></p></li>
|
||||
</ul>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
|
||||
</div>
|
||||
@@ -93,7 +93,7 @@
|
||||
|
||||
|
||||
<h3>Navigation</h3>
|
||||
<p class="caption"><span class="caption-text">Contents:</span></p>
|
||||
<p class="caption" role="heading"><span class="caption-text">Contents:</span></p>
|
||||
<ul>
|
||||
<li class="toctree-l1"><a class="reference internal" href="pyalsaaudio.html">Introduction</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="pyalsaaudio.html#what-is-alsa">What is ALSA</a></li>
|
||||
@@ -115,7 +115,7 @@
|
||||
<h3 id="searchlabel">Quick search</h3>
|
||||
<div class="searchformwrapper">
|
||||
<form class="search" action="search.html" method="get">
|
||||
<input type="text" name="q" aria-labelledby="searchlabel" />
|
||||
<input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
|
||||
<input type="submit" value="Go" />
|
||||
</form>
|
||||
</div>
|
||||
@@ -137,7 +137,7 @@
|
||||
©2017, Lars Immisch & Casper Wilstrup.
|
||||
|
||||
|
|
||||
Powered by <a href="http://sphinx-doc.org/">Sphinx 3.1.2</a>
|
||||
Powered by <a href="http://sphinx-doc.org/">Sphinx 4.5.0</a>
|
||||
& <a href="https://github.com/bitprophet/alabaster">Alabaster 0.7.12</a>
|
||||
|
||||
|
|
||||
|
||||
+179
-90
@@ -4,15 +4,15 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>alsaaudio — alsaaudio documentation 0.9.0 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>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="generator" content="Docutils 0.17.1: http://docutils.sourceforge.net/" />
|
||||
|
||||
<title>alsaaudio — alsaaudio documentation 0.9.1 documentation</title>
|
||||
<link rel="stylesheet" type="text/css" href="_static/pygments.css" />
|
||||
<link rel="stylesheet" type="text/css" href="_static/alabaster.css" />
|
||||
<script data-url_root="./" id="documentation_options" src="_static/documentation_options.js"></script>
|
||||
<script src="_static/jquery.js"></script>
|
||||
<script src="_static/underscore.js"></script>
|
||||
<script src="_static/doctools.js"></script>
|
||||
<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="prev" title="PCM Terminology and Concepts" href="terminology.html" />
|
||||
@@ -32,16 +32,16 @@
|
||||
|
||||
<div class="body" role="main">
|
||||
|
||||
<div class="section" id="module-alsaaudio">
|
||||
<section id="module-alsaaudio">
|
||||
<span id="alsaaudio"></span><h1><a class="reference internal" href="#module-alsaaudio" title="alsaaudio (Linux)"><code class="xref py py-mod docutils literal notranslate"><span class="pre">alsaaudio</span></code></a><a class="headerlink" href="#module-alsaaudio" title="Permalink to this headline">¶</a></h1>
|
||||
<p>The <a class="reference internal" href="#module-alsaaudio" title="alsaaudio (Linux)"><code class="xref py py-mod docutils literal notranslate"><span class="pre">alsaaudio</span></code></a> module defines functions and classes for using ALSA.</p>
|
||||
<dl class="py function">
|
||||
<dt id="alsaaudio.pcms">
|
||||
<code class="sig-prename descclassname">alsaaudio.</code><code class="sig-name descname">pcms</code><span class="sig-paren">(</span><span class="optional">[</span><em class="sig-param">type=PCM_PLAYBACK</em><span class="optional">]</span><span class="sig-paren">)</span><a class="headerlink" href="#alsaaudio.pcms" title="Permalink to this definition">¶</a></dt>
|
||||
<dt class="sig sig-object py" id="alsaaudio.pcms">
|
||||
<span class="sig-prename descclassname"><span class="pre">alsaaudio.</span></span><span class="sig-name descname"><span class="pre">pcms</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">pcmtype</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">PCM_PLAYBACK</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#alsaaudio.pcms" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>List available PCM devices by name.</p>
|
||||
<p>Arguments are:</p>
|
||||
<ul class="simple">
|
||||
<li><p><em>type</em> - can be either <code class="xref py py-const docutils literal notranslate"><span class="pre">PCM_CAPTURE</span></code> or <code class="xref py py-const docutils literal notranslate"><span class="pre">PCM_PLAYBACK</span></code>
|
||||
<li><p><em>pcmtype</em> - can be either <code class="xref py py-const docutils literal notranslate"><span class="pre">PCM_CAPTURE</span></code> or <code class="xref py py-const docutils literal notranslate"><span class="pre">PCM_PLAYBACK</span></code>
|
||||
(default).</p></li>
|
||||
</ul>
|
||||
<p><strong>Note:</strong></p>
|
||||
@@ -60,16 +60,16 @@ commandline:</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py function">
|
||||
<dt id="alsaaudio.cards">
|
||||
<code class="sig-prename descclassname">alsaaudio.</code><code class="sig-name descname">cards</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#alsaaudio.cards" title="Permalink to this definition">¶</a></dt>
|
||||
<dt class="sig sig-object py" id="alsaaudio.cards">
|
||||
<span class="sig-prename descclassname"><span class="pre">alsaaudio.</span></span><span class="sig-name descname"><span class="pre">cards</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#alsaaudio.cards" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>List the available ALSA cards by name. This function is only moderately
|
||||
useful. If you want to see a list of available PCM devices, use <a class="reference internal" href="#alsaaudio.pcms" title="alsaaudio.pcms"><code class="xref py py-func docutils literal notranslate"><span class="pre">pcms()</span></code></a>
|
||||
instead.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py function">
|
||||
<dt id="alsaaudio.mixers">
|
||||
<code class="sig-prename descclassname">alsaaudio.</code><code class="sig-name descname">mixers</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">cardindex</span><span class="o">=</span><span class="default_value">- 1</span></em>, <em class="sig-param"><span class="n">device</span><span class="o">=</span><span class="default_value">'default'</span></em><span class="sig-paren">)</span><a class="headerlink" href="#alsaaudio.mixers" title="Permalink to this definition">¶</a></dt>
|
||||
<dt class="sig sig-object py" id="alsaaudio.mixers">
|
||||
<span class="sig-prename descclassname"><span class="pre">alsaaudio.</span></span><span class="sig-name descname"><span class="pre">mixers</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">cardindex</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">-</span> <span class="pre">1</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">device</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">'default'</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#alsaaudio.mixers" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>List the available mixers. The arguments are:</p>
|
||||
<ul class="simple">
|
||||
<li><p><em>cardindex</em> - the card index. If this argument is given, the device name
|
||||
@@ -103,14 +103,20 @@ device, not the mixers for the first card.</p></li>
|
||||
</ul>
|
||||
</dd></dl>
|
||||
|
||||
<div class="section" id="pcm-objects">
|
||||
<dl class="py function">
|
||||
<dt class="sig sig-object py" id="alsaaudio.asoundlib_version">
|
||||
<span class="sig-prename descclassname"><span class="pre">alsaaudio.</span></span><span class="sig-name descname"><span class="pre">asoundlib_version</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#alsaaudio.asoundlib_version" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Return a Python string containing the ALSA version found.</p>
|
||||
</dd></dl>
|
||||
|
||||
<section id="pcm-objects">
|
||||
<span id="id1"></span><h2>PCM Objects<a class="headerlink" href="#pcm-objects" title="Permalink to this headline">¶</a></h2>
|
||||
<p>PCM objects in <a class="reference internal" href="#module-alsaaudio" title="alsaaudio (Linux)"><code class="xref py py-mod docutils literal notranslate"><span class="pre">alsaaudio</span></code></a> can play or capture (record) PCM
|
||||
sound through speakers or a microphone. The PCM constructor takes the
|
||||
following arguments:</p>
|
||||
<dl class="py class">
|
||||
<dt id="alsaaudio.PCM">
|
||||
<em class="property">class </em><code class="sig-prename descclassname">alsaaudio.</code><code class="sig-name descname">PCM</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">type</span><span class="o">=</span><span class="default_value">PCM_PLAYBACK</span></em>, <em class="sig-param"><span class="n">mode</span><span class="o">=</span><span class="default_value">PCM_NORMAL</span></em>, <em class="sig-param"><span class="n">rate</span><span class="o">=</span><span class="default_value">44100</span></em>, <em class="sig-param"><span class="n">channels</span><span class="o">=</span><span class="default_value">2</span></em>, <em class="sig-param"><span class="n">format</span><span class="o">=</span><span class="default_value">PCM_FORMAT_S16_LE</span></em>, <em class="sig-param"><span class="n">periodsize</span><span class="o">=</span><span class="default_value">32</span></em>, <em class="sig-param"><span class="n">device</span><span class="o">=</span><span class="default_value">'default'</span></em>, <em class="sig-param"><span class="n">cardindex</span><span class="o">=</span><span class="default_value">- 1</span></em><span class="sig-paren">)</span><a class="headerlink" href="#alsaaudio.PCM" title="Permalink to this definition">¶</a></dt>
|
||||
<dt class="sig sig-object py" id="alsaaudio.PCM">
|
||||
<em class="property"><span class="pre">class</span><span class="w"> </span></em><span class="sig-prename descclassname"><span class="pre">alsaaudio.</span></span><span class="sig-name descname"><span class="pre">PCM</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">type</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">PCM_PLAYBACK</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">mode</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">PCM_NORMAL</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">rate</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">44100</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">channels</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">2</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">format</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">PCM_FORMAT_S16_LE</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">periodsize</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">32</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">device</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">'default'</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">cardindex</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">-</span> <span class="pre">1</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#alsaaudio.PCM" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>This class is used to represent a PCM device (either for playback and
|
||||
recording). The arguments are:</p>
|
||||
<ul class="simple">
|
||||
@@ -244,60 +250,60 @@ name of the card. This was always fragile and broke some legitimate usecases.</p
|
||||
|
||||
<p>PCM objects have the following methods:</p>
|
||||
<dl class="py method">
|
||||
<dt id="alsaaudio.PCM.pcmtype">
|
||||
<code class="sig-prename descclassname">PCM.</code><code class="sig-name descname">pcmtype</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#alsaaudio.PCM.pcmtype" title="Permalink to this definition">¶</a></dt>
|
||||
<dt class="sig sig-object py" id="alsaaudio.PCM.pcmtype">
|
||||
<span class="sig-prename descclassname"><span class="pre">PCM.</span></span><span class="sig-name descname"><span class="pre">pcmtype</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#alsaaudio.PCM.pcmtype" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Returns the type of PCM object. Either <code class="xref py py-const docutils literal notranslate"><span class="pre">PCM_CAPTURE</span></code> or
|
||||
<code class="xref py py-const docutils literal notranslate"><span class="pre">PCM_PLAYBACK</span></code>.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="alsaaudio.PCM.pcmmode">
|
||||
<code class="sig-prename descclassname">PCM.</code><code class="sig-name descname">pcmmode</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#alsaaudio.PCM.pcmmode" title="Permalink to this definition">¶</a></dt>
|
||||
<dt class="sig sig-object py" id="alsaaudio.PCM.pcmmode">
|
||||
<span class="sig-prename descclassname"><span class="pre">PCM.</span></span><span class="sig-name descname"><span class="pre">pcmmode</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#alsaaudio.PCM.pcmmode" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Return the mode of the PCM object. One of <code class="xref py py-const docutils literal notranslate"><span class="pre">PCM_NONBLOCK</span></code>,
|
||||
<code class="xref py py-const docutils literal notranslate"><span class="pre">PCM_ASYNC</span></code>, or <code class="xref py py-const docutils literal notranslate"><span class="pre">PCM_NORMAL</span></code></p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="alsaaudio.PCM.cardname">
|
||||
<code class="sig-prename descclassname">PCM.</code><code class="sig-name descname">cardname</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#alsaaudio.PCM.cardname" title="Permalink to this definition">¶</a></dt>
|
||||
<dt class="sig sig-object py" id="alsaaudio.PCM.cardname">
|
||||
<span class="sig-prename descclassname"><span class="pre">PCM.</span></span><span class="sig-name descname"><span class="pre">cardname</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#alsaaudio.PCM.cardname" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Return the name of the sound card used by this PCM object.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="alsaaudio.PCM.setchannels">
|
||||
<code class="sig-prename descclassname">PCM.</code><code class="sig-name descname">setchannels</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">nchannels</span></em><span class="sig-paren">)</span><a class="headerlink" href="#alsaaudio.PCM.setchannels" title="Permalink to this definition">¶</a></dt>
|
||||
<dt class="sig sig-object py" id="alsaaudio.PCM.setchannels">
|
||||
<span class="sig-prename descclassname"><span class="pre">PCM.</span></span><span class="sig-name descname"><span class="pre">setchannels</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">nchannels</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#alsaaudio.PCM.setchannels" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><div class="deprecated">
|
||||
<p><span class="versionmodified deprecated">Deprecated since version 0.9: </span>Use the <cite>channels</cite> named argument to <a class="reference internal" href="#alsaaudio.PCM" title="alsaaudio.PCM"><code class="xref py py-func docutils literal notranslate"><span class="pre">PCM()</span></code></a>.</p>
|
||||
</div>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="alsaaudio.PCM.setrate">
|
||||
<code class="sig-prename descclassname">PCM.</code><code class="sig-name descname">setrate</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">rate</span></em><span class="sig-paren">)</span><a class="headerlink" href="#alsaaudio.PCM.setrate" title="Permalink to this definition">¶</a></dt>
|
||||
<dt class="sig sig-object py" id="alsaaudio.PCM.setrate">
|
||||
<span class="sig-prename descclassname"><span class="pre">PCM.</span></span><span class="sig-name descname"><span class="pre">setrate</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">rate</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#alsaaudio.PCM.setrate" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><div class="deprecated">
|
||||
<p><span class="versionmodified deprecated">Deprecated since version 0.9: </span>Use the <cite>rate</cite> named argument to <a class="reference internal" href="#alsaaudio.PCM" title="alsaaudio.PCM"><code class="xref py py-func docutils literal notranslate"><span class="pre">PCM()</span></code></a>.</p>
|
||||
</div>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="alsaaudio.PCM.setformat">
|
||||
<code class="sig-prename descclassname">PCM.</code><code class="sig-name descname">setformat</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">format</span></em><span class="sig-paren">)</span><a class="headerlink" href="#alsaaudio.PCM.setformat" title="Permalink to this definition">¶</a></dt>
|
||||
<dt class="sig sig-object py" id="alsaaudio.PCM.setformat">
|
||||
<span class="sig-prename descclassname"><span class="pre">PCM.</span></span><span class="sig-name descname"><span class="pre">setformat</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">format</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#alsaaudio.PCM.setformat" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><div class="deprecated">
|
||||
<p><span class="versionmodified deprecated">Deprecated since version 0.9: </span>Use the <cite>format</cite> named argument to <a class="reference internal" href="#alsaaudio.PCM" title="alsaaudio.PCM"><code class="xref py py-func docutils literal notranslate"><span class="pre">PCM()</span></code></a>.</p>
|
||||
</div>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="alsaaudio.PCM.setperiodsize">
|
||||
<code class="sig-prename descclassname">PCM.</code><code class="sig-name descname">setperiodsize</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">period</span></em><span class="sig-paren">)</span><a class="headerlink" href="#alsaaudio.PCM.setperiodsize" title="Permalink to this definition">¶</a></dt>
|
||||
<dt class="sig sig-object py" id="alsaaudio.PCM.setperiodsize">
|
||||
<span class="sig-prename descclassname"><span class="pre">PCM.</span></span><span class="sig-name descname"><span class="pre">setperiodsize</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">period</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#alsaaudio.PCM.setperiodsize" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><div class="deprecated">
|
||||
<p><span class="versionmodified deprecated">Deprecated since version 0.9: </span>Use the <cite>periodsize</cite> named argument to <a class="reference internal" href="#alsaaudio.PCM" title="alsaaudio.PCM"><code class="xref py py-func docutils literal notranslate"><span class="pre">PCM()</span></code></a>.</p>
|
||||
</div>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="alsaaudio.PCM.read">
|
||||
<code class="sig-prename descclassname">PCM.</code><code class="sig-name descname">read</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#alsaaudio.PCM.read" title="Permalink to this definition">¶</a></dt>
|
||||
<dt class="sig sig-object py" id="alsaaudio.PCM.read">
|
||||
<span class="sig-prename descclassname"><span class="pre">PCM.</span></span><span class="sig-name descname"><span class="pre">read</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#alsaaudio.PCM.read" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>In <code class="xref py py-const docutils literal notranslate"><span class="pre">PCM_NORMAL</span></code> mode, this function blocks until a full period is
|
||||
available, and then returns a tuple (length,data) where <em>length</em> is
|
||||
the number of frames of captured data, and <em>data</em> is the captured
|
||||
@@ -312,8 +318,8 @@ Try using a larger periodsize.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="alsaaudio.PCM.write">
|
||||
<code class="sig-prename descclassname">PCM.</code><code class="sig-name descname">write</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">data</span></em><span class="sig-paren">)</span><a class="headerlink" href="#alsaaudio.PCM.write" title="Permalink to this definition">¶</a></dt>
|
||||
<dt class="sig sig-object py" id="alsaaudio.PCM.write">
|
||||
<span class="sig-prename descclassname"><span class="pre">PCM.</span></span><span class="sig-name descname"><span class="pre">write</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">data</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#alsaaudio.PCM.write" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Writes (plays) the sound in data. The length of data <em>must</em> be a
|
||||
multiple of the frame size, and <em>should</em> be exactly the size of a
|
||||
period. If less than ‘period size’ frames are provided, the actual
|
||||
@@ -328,21 +334,104 @@ should be written at a later time.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="alsaaudio.PCM.pause">
|
||||
<code class="sig-prename descclassname">PCM.</code><code class="sig-name descname">pause</code><span class="sig-paren">(</span><span class="optional">[</span><em class="sig-param">enable=True</em><span class="optional">]</span><span class="sig-paren">)</span><a class="headerlink" href="#alsaaudio.PCM.pause" title="Permalink to this definition">¶</a></dt>
|
||||
<dt class="sig sig-object py" id="alsaaudio.PCM.pause">
|
||||
<span class="sig-prename descclassname"><span class="pre">PCM.</span></span><span class="sig-name descname"><span class="pre">pause</span></span><span class="sig-paren">(</span><span class="optional">[</span><em class="sig-param"><span class="n"><span class="pre">enable=True</span></span></em><span class="optional">]</span><span class="sig-paren">)</span><a class="headerlink" href="#alsaaudio.PCM.pause" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>If <em>enable</em> is <code class="xref py py-const docutils literal notranslate"><span class="pre">True</span></code>, playback or capture is paused.
|
||||
Otherwise, playback/capture is resumed.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="alsaaudio.PCM.polldescriptors">
|
||||
<code class="sig-prename descclassname">PCM.</code><code class="sig-name descname">polldescriptors</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#alsaaudio.PCM.polldescriptors" title="Permalink to this definition">¶</a></dt>
|
||||
<dt class="sig sig-object py" id="alsaaudio.PCM.polldescriptors">
|
||||
<span class="sig-prename descclassname"><span class="pre">PCM.</span></span><span class="sig-name descname"><span class="pre">polldescriptors</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#alsaaudio.PCM.polldescriptors" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Returns a tuple of <em>(file descriptor, eventmask)</em> that can be used to
|
||||
wait for changes on the mixer with <em>select.poll</em>.</p>
|
||||
wait for changes on the PCM with <em>select.poll</em>.</p>
|
||||
<p>The <em>eventmask</em> value is compatible with <a class="reference external" href="http://docs.python.org/library/select.html#poll-objects">poll.register</a> in the Python
|
||||
<code class="xref py py-const docutils literal notranslate"><span class="pre">select</span></code> module.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt class="sig sig-object py" id="alsaaudio.PCM.set_tstamp_mode">
|
||||
<span class="sig-prename descclassname"><span class="pre">PCM.</span></span><span class="sig-name descname"><span class="pre">set_tstamp_mode</span></span><span class="sig-paren">(</span><span class="optional">[</span><em class="sig-param"><span class="n"><span class="pre">mode=PCM_TSTAMP_ENABLE</span></span></em><span class="optional">]</span><span class="sig-paren">)</span><a class="headerlink" href="#alsaaudio.PCM.set_tstamp_mode" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Set the ALSA timestamp mode on the device. The mode argument can be set to
|
||||
either <code class="xref py py-const docutils literal notranslate"><span class="pre">PCM_TSTAMP_NONE</span></code> or <code class="xref py py-const docutils literal notranslate"><span class="pre">PCM_TSTAMP_ENABLE</span></code>.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt class="sig sig-object py" id="alsaaudio.PCM.get_tstamp_mode">
|
||||
<span class="sig-prename descclassname"><span class="pre">PCM.</span></span><span class="sig-name descname"><span class="pre">get_tstamp_mode</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#alsaaudio.PCM.get_tstamp_mode" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Return the integer value corresponding to the ALSA timestamp mode. The
|
||||
return value can be either <code class="xref py py-const docutils literal notranslate"><span class="pre">PCM_TSTAMP_NONE</span></code> or <code class="xref py py-const docutils literal notranslate"><span class="pre">PCM_TSTAMP_ENABLE</span></code>.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt class="sig sig-object py" id="alsaaudio.PCM.set_tstamp_type">
|
||||
<span class="sig-prename descclassname"><span class="pre">PCM.</span></span><span class="sig-name descname"><span class="pre">set_tstamp_type</span></span><span class="sig-paren">(</span><span class="optional">[</span><em class="sig-param"><span class="n"><span class="pre">type=PCM_TSTAMP_TYPE_GETTIMEOFDAY</span></span></em><span class="optional">]</span><span class="sig-paren">)</span><a class="headerlink" href="#alsaaudio.PCM.set_tstamp_type" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Set the ALSA timestamp mode on the device. The type argument
|
||||
can be set to either <code class="xref py py-const docutils literal notranslate"><span class="pre">PCM_TSTAMP_TYPE_GETTIMEOFDAY</span></code>,
|
||||
<code class="xref py py-const docutils literal notranslate"><span class="pre">PCM_TSTAMP_TYPE_MONOTONIC</span></code> or <code class="xref py py-const docutils literal notranslate"><span class="pre">PCM_TSTAMP_TYPE_MONOTONIC_RAW</span></code>.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt class="sig sig-object py" id="alsaaudio.PCM.get_tstamp_type">
|
||||
<span class="sig-prename descclassname"><span class="pre">PCM.</span></span><span class="sig-name descname"><span class="pre">get_tstamp_type</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#alsaaudio.PCM.get_tstamp_type" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Return the integer value corresponding to the ALSA timestamp type. The
|
||||
return value can be either <code class="xref py py-const docutils literal notranslate"><span class="pre">PCM_TSTAMP_TYPE_GETTIMEOFDAY</span></code>,
|
||||
<code class="xref py py-const docutils literal notranslate"><span class="pre">PCM_TSTAMP_TYPE_MONOTONIC</span></code> or <code class="xref py py-const docutils literal notranslate"><span class="pre">PCM_TSTAMP_TYPE_MONOTONIC_RAW</span></code>.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt class="sig sig-object py" id="alsaaudio.PCM.htimestamp">
|
||||
<span class="sig-prename descclassname"><span class="pre">PCM.</span></span><span class="sig-name descname"><span class="pre">htimestamp</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#alsaaudio.PCM.htimestamp" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Return a Python tuple <em>(seconds, nanoseconds, frames_available_in_buffer)</em>.</p>
|
||||
<p>The type of output is controlled by the tstamp_type, as described in the table below.</p>
|
||||
<table class="docutils align-default">
|
||||
<colgroup>
|
||||
<col style="width: 43%" />
|
||||
<col style="width: 57%" />
|
||||
</colgroup>
|
||||
<thead>
|
||||
<tr class="row-odd"><th class="head"><p>Timestamp Type</p></th>
|
||||
<th class="head"><p>Description</p></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr class="row-even"><td><p><code class="docutils literal notranslate"><span class="pre">PCM_TSTAMP_TYPE_GETTIMEOFDAY</span></code></p></td>
|
||||
<td><p>System-wide realtime clock with seconds
|
||||
since epoch.</p></td>
|
||||
</tr>
|
||||
<tr class="row-odd"><td><p><code class="docutils literal notranslate"><span class="pre">PCM_TSTAMP_TYPE_MONOTONIC</span></code></p></td>
|
||||
<td><p>Monotonic time from an unspecified starting
|
||||
time. Progress is NTP synchronized.</p></td>
|
||||
</tr>
|
||||
<tr class="row-even"><td><p><code class="docutils literal notranslate"><span class="pre">PCM_TSTAMP_TYPE_MONOTONIC_RAW</span></code></p></td>
|
||||
<td><p>Monotonic time from an unspecified starting
|
||||
time using only the system clock.</p></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<p>The timestamp mode is controlled by the tstamp_mode, as described in the table below.</p>
|
||||
<table class="docutils align-default">
|
||||
<colgroup>
|
||||
<col style="width: 43%" />
|
||||
<col style="width: 57%" />
|
||||
</colgroup>
|
||||
<thead>
|
||||
<tr class="row-odd"><th class="head"><p>Timestamp Mode</p></th>
|
||||
<th class="head"><p>Description</p></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr class="row-even"><td><p><code class="docutils literal notranslate"><span class="pre">PCM_TSTAMP_NONE</span></code></p></td>
|
||||
<td><p>No timestamp.</p></td>
|
||||
</tr>
|
||||
<tr class="row-odd"><td><p><code class="docutils literal notranslate"><span class="pre">PCM_TSTAMP_ENABLE</span></code></p></td>
|
||||
<td><p>Update timestamp at every hardware position
|
||||
update.</p></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</dd></dl>
|
||||
|
||||
<p><strong>A few hints on using PCM devices for playback</strong></p>
|
||||
<p>The most common reason for problems with playback of PCM audio is that writes
|
||||
to PCM devices must <em>exactly</em> match the data rate of the device.</p>
|
||||
@@ -364,13 +453,13 @@ accummulate time delays: If you set the timer to expire after 1/10’th
|
||||
of a second, the actual timeout will happen slightly later, which will
|
||||
accumulate to quite a lot after a few seconds. Hint: use time.time()
|
||||
to check how much time has really passed, and add extra writes as nessecary.</p>
|
||||
</div>
|
||||
<div class="section" id="mixer-objects">
|
||||
</section>
|
||||
<section id="mixer-objects">
|
||||
<span id="id3"></span><h2>Mixer Objects<a class="headerlink" href="#mixer-objects" title="Permalink to this headline">¶</a></h2>
|
||||
<p>Mixer objects provides access to the ALSA mixer API.</p>
|
||||
<dl class="py class">
|
||||
<dt id="alsaaudio.Mixer">
|
||||
<em class="property">class </em><code class="sig-prename descclassname">alsaaudio.</code><code class="sig-name descname">Mixer</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">control</span><span class="o">=</span><span class="default_value">'Master'</span></em>, <em class="sig-param"><span class="n">id</span><span class="o">=</span><span class="default_value">0</span></em>, <em class="sig-param"><span class="n">cardindex</span><span class="o">=</span><span class="default_value">- 1</span></em>, <em class="sig-param"><span class="n">device</span><span class="o">=</span><span class="default_value">'default'</span></em><span class="sig-paren">)</span><a class="headerlink" href="#alsaaudio.Mixer" title="Permalink to this definition">¶</a></dt>
|
||||
<dt class="sig sig-object py" id="alsaaudio.Mixer">
|
||||
<em class="property"><span class="pre">class</span><span class="w"> </span></em><span class="sig-prename descclassname"><span class="pre">alsaaudio.</span></span><span class="sig-name descname"><span class="pre">Mixer</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">control</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">'Master'</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">id</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">0</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">cardindex</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">-</span> <span class="pre">1</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">device</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">'default'</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#alsaaudio.Mixer" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Arguments are:</p>
|
||||
<ul class="simple">
|
||||
<li><p><em>control</em> - specifies which control to manipulate using this mixer
|
||||
@@ -395,27 +484,27 @@ devices.</p></li>
|
||||
|
||||
<p>Mixer objects have the following methods:</p>
|
||||
<dl class="py method">
|
||||
<dt id="alsaaudio.Mixer.cardname">
|
||||
<code class="sig-prename descclassname">Mixer.</code><code class="sig-name descname">cardname</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#alsaaudio.Mixer.cardname" title="Permalink to this definition">¶</a></dt>
|
||||
<dt class="sig sig-object py" id="alsaaudio.Mixer.cardname">
|
||||
<span class="sig-prename descclassname"><span class="pre">Mixer.</span></span><span class="sig-name descname"><span class="pre">cardname</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#alsaaudio.Mixer.cardname" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Return the name of the sound card used by this Mixer object</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="alsaaudio.Mixer.mixer">
|
||||
<code class="sig-prename descclassname">Mixer.</code><code class="sig-name descname">mixer</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#alsaaudio.Mixer.mixer" title="Permalink to this definition">¶</a></dt>
|
||||
<dt class="sig sig-object py" id="alsaaudio.Mixer.mixer">
|
||||
<span class="sig-prename descclassname"><span class="pre">Mixer.</span></span><span class="sig-name descname"><span class="pre">mixer</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#alsaaudio.Mixer.mixer" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Return the name of the specific mixer controlled by this object, For example
|
||||
<code class="docutils literal notranslate"><span class="pre">'Master'</span></code> or <code class="docutils literal notranslate"><span class="pre">'PCM'</span></code></p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="alsaaudio.Mixer.mixerid">
|
||||
<code class="sig-prename descclassname">Mixer.</code><code class="sig-name descname">mixerid</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#alsaaudio.Mixer.mixerid" title="Permalink to this definition">¶</a></dt>
|
||||
<dt class="sig sig-object py" id="alsaaudio.Mixer.mixerid">
|
||||
<span class="sig-prename descclassname"><span class="pre">Mixer.</span></span><span class="sig-name descname"><span class="pre">mixerid</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#alsaaudio.Mixer.mixerid" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Return the ID of the ALSA mixer controlled by this object.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="alsaaudio.Mixer.switchcap">
|
||||
<code class="sig-prename descclassname">Mixer.</code><code class="sig-name descname">switchcap</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#alsaaudio.Mixer.switchcap" title="Permalink to this definition">¶</a></dt>
|
||||
<dt class="sig sig-object py" id="alsaaudio.Mixer.switchcap">
|
||||
<span class="sig-prename descclassname"><span class="pre">Mixer.</span></span><span class="sig-name descname"><span class="pre">switchcap</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#alsaaudio.Mixer.switchcap" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Returns a list of the switches which are defined by this specific mixer.
|
||||
Possible values in this list are:</p>
|
||||
<table class="docutils align-default">
|
||||
@@ -457,8 +546,8 @@ Possible values in this list are:</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="alsaaudio.Mixer.volumecap">
|
||||
<code class="sig-prename descclassname">Mixer.</code><code class="sig-name descname">volumecap</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#alsaaudio.Mixer.volumecap" title="Permalink to this definition">¶</a></dt>
|
||||
<dt class="sig sig-object py" id="alsaaudio.Mixer.volumecap">
|
||||
<span class="sig-prename descclassname"><span class="pre">Mixer.</span></span><span class="sig-name descname"><span class="pre">volumecap</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#alsaaudio.Mixer.volumecap" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Returns a list of the volume control capabilities of this
|
||||
mixer. Possible values in the list are:</p>
|
||||
<table class="docutils align-default">
|
||||
@@ -495,8 +584,8 @@ mixer. Possible values in the list are:</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="alsaaudio.Mixer.getenum">
|
||||
<code class="sig-prename descclassname">Mixer.</code><code class="sig-name descname">getenum</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#alsaaudio.Mixer.getenum" title="Permalink to this definition">¶</a></dt>
|
||||
<dt class="sig sig-object py" id="alsaaudio.Mixer.getenum">
|
||||
<span class="sig-prename descclassname"><span class="pre">Mixer.</span></span><span class="sig-name descname"><span class="pre">getenum</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#alsaaudio.Mixer.getenum" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>For enumerated controls, return the currently selected item and the list of
|
||||
items available.</p>
|
||||
<p>Returns a tuple <em>(string, list of strings)</em>.</p>
|
||||
@@ -521,59 +610,59 @@ control.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="alsaaudio.Mixer.getmute">
|
||||
<code class="sig-prename descclassname">Mixer.</code><code class="sig-name descname">getmute</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#alsaaudio.Mixer.getmute" title="Permalink to this definition">¶</a></dt>
|
||||
<dt class="sig sig-object py" id="alsaaudio.Mixer.getmute">
|
||||
<span class="sig-prename descclassname"><span class="pre">Mixer.</span></span><span class="sig-name descname"><span class="pre">getmute</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#alsaaudio.Mixer.getmute" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Return a list indicating the current mute setting for each
|
||||
channel. 0 means not muted, 1 means muted.</p>
|
||||
<p>This method will fail if the mixer has no playback switch capabilities.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="alsaaudio.Mixer.getrange">
|
||||
<code class="sig-prename descclassname">Mixer.</code><code class="sig-name descname">getrange</code><span class="sig-paren">(</span><span class="optional">[</span><em class="sig-param">direction</em><span class="optional">]</span><span class="sig-paren">)</span><a class="headerlink" href="#alsaaudio.Mixer.getrange" title="Permalink to this definition">¶</a></dt>
|
||||
<dt class="sig sig-object py" id="alsaaudio.Mixer.getrange">
|
||||
<span class="sig-prename descclassname"><span class="pre">Mixer.</span></span><span class="sig-name descname"><span class="pre">getrange</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">pcmtype</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">PCM_PLAYBACK</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#alsaaudio.Mixer.getrange" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Return the volume range of the ALSA mixer controlled by this object.</p>
|
||||
<p>The optional <em>direction</em> argument can be either <code class="xref py py-const docutils literal notranslate"><span class="pre">PCM_PLAYBACK</span></code> or
|
||||
<p>The optional <em>pcmtype</em> argument can be either <code class="xref py py-const docutils literal notranslate"><span class="pre">PCM_PLAYBACK</span></code> or
|
||||
<code class="xref py py-const docutils literal notranslate"><span class="pre">PCM_CAPTURE</span></code>, which is relevant if the mixer can control both
|
||||
playback and capture volume. The default value is <code class="xref py py-const docutils literal notranslate"><span class="pre">PCM_PLAYBACK</span></code>
|
||||
if the mixer has playback channels, otherwise it is <code class="xref py py-const docutils literal notranslate"><span class="pre">PCM_CAPTURE</span></code>.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="alsaaudio.Mixer.getrec">
|
||||
<code class="sig-prename descclassname">Mixer.</code><code class="sig-name descname">getrec</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#alsaaudio.Mixer.getrec" title="Permalink to this definition">¶</a></dt>
|
||||
<dt class="sig sig-object py" id="alsaaudio.Mixer.getrec">
|
||||
<span class="sig-prename descclassname"><span class="pre">Mixer.</span></span><span class="sig-name descname"><span class="pre">getrec</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#alsaaudio.Mixer.getrec" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Return a list indicating the current record mute setting for each channel. 0
|
||||
means not recording, 1 means recording.</p>
|
||||
<p>This method will fail if the mixer has no capture switch capabilities.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="alsaaudio.Mixer.getvolume">
|
||||
<code class="sig-prename descclassname">Mixer.</code><code class="sig-name descname">getvolume</code><span class="sig-paren">(</span><span class="optional">[</span><em class="sig-param">direction</em><span class="optional">]</span><span class="sig-paren">)</span><a class="headerlink" href="#alsaaudio.Mixer.getvolume" title="Permalink to this definition">¶</a></dt>
|
||||
<dt class="sig sig-object py" id="alsaaudio.Mixer.getvolume">
|
||||
<span class="sig-prename descclassname"><span class="pre">Mixer.</span></span><span class="sig-name descname"><span class="pre">getvolume</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">pcmtype</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">PCM_PLAYBACK</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#alsaaudio.Mixer.getvolume" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Returns a list with the current volume settings for each channel. The list
|
||||
elements are integer percentages.</p>
|
||||
<p>The optional <em>direction</em> argument can be either <code class="xref py py-const docutils literal notranslate"><span class="pre">PCM_PLAYBACK</span></code> or
|
||||
<p>The optional <em>pcmtype</em> argument can be either <code class="xref py py-const docutils literal notranslate"><span class="pre">PCM_PLAYBACK</span></code> or
|
||||
<code class="xref py py-const docutils literal notranslate"><span class="pre">PCM_CAPTURE</span></code>, which is relevant if the mixer can control both
|
||||
playback and capture volume. The default value is <code class="xref py py-const docutils literal notranslate"><span class="pre">PCM_PLAYBACK</span></code>
|
||||
if the mixer has playback channels, otherwise it is <code class="xref py py-const docutils literal notranslate"><span class="pre">PCM_CAPTURE</span></code>.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="alsaaudio.Mixer.setvolume">
|
||||
<code class="sig-prename descclassname">Mixer.</code><code class="sig-name descname">setvolume</code><span class="sig-paren">(</span><em class="sig-param">volume</em><span class="optional">[</span>, <em class="sig-param">channel</em><span class="optional">]</span><span class="optional">[</span>, <em class="sig-param">direction</em><span class="optional">]</span><span class="sig-paren">)</span><a class="headerlink" href="#alsaaudio.Mixer.setvolume" title="Permalink to this definition">¶</a></dt>
|
||||
<dt class="sig sig-object py" id="alsaaudio.Mixer.setvolume">
|
||||
<span class="sig-prename descclassname"><span class="pre">Mixer.</span></span><span class="sig-name descname"><span class="pre">setvolume</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">volume</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">channel</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">pcmtype</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">PCM_PLAYBACK</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#alsaaudio.Mixer.setvolume" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Change the current volume settings for this mixer. The <em>volume</em> argument
|
||||
controls the new volume setting as an integer percentage.</p>
|
||||
<p>If the optional argument <em>channel</em> is present, the volume is set
|
||||
only for this channel. This assumes that the mixer can control the
|
||||
volume for the channels independently.</p>
|
||||
<p>The optional <em>direction</em> argument can be either <code class="xref py py-const docutils literal notranslate"><span class="pre">PCM_PLAYBACK</span></code> or
|
||||
<p>The optional <em>pcmtype</em> argument can be either <code class="xref py py-const docutils literal notranslate"><span class="pre">PCM_PLAYBACK</span></code> or
|
||||
<code class="xref py py-const docutils literal notranslate"><span class="pre">PCM_CAPTURE</span></code>, which is relevant if the mixer can control both
|
||||
playback and capture volume. The default value is <code class="xref py py-const docutils literal notranslate"><span class="pre">PCM_PLAYBACK</span></code>
|
||||
if the mixer has playback channels, otherwise it is <code class="xref py py-const docutils literal notranslate"><span class="pre">PCM_CAPTURE</span></code>.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="alsaaudio.Mixer.setmute">
|
||||
<code class="sig-prename descclassname">Mixer.</code><code class="sig-name descname">setmute</code><span class="sig-paren">(</span><em class="sig-param">mute</em><span class="optional">[</span>, <em class="sig-param">channel</em><span class="optional">]</span><span class="sig-paren">)</span><a class="headerlink" href="#alsaaudio.Mixer.setmute" title="Permalink to this definition">¶</a></dt>
|
||||
<dt class="sig sig-object py" id="alsaaudio.Mixer.setmute">
|
||||
<span class="sig-prename descclassname"><span class="pre">Mixer.</span></span><span class="sig-name descname"><span class="pre">setmute</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">mute</span></span></em><span class="optional">[</span>, <em class="sig-param"><span class="n"><span class="pre">channel</span></span></em><span class="optional">]</span><span class="sig-paren">)</span><a class="headerlink" href="#alsaaudio.Mixer.setmute" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Sets the mute flag to a new value. The <em>mute</em> argument is either 0 for not
|
||||
muted, or 1 for muted.</p>
|
||||
<p>The optional <em>channel</em> argument controls which channel is
|
||||
@@ -582,8 +671,8 @@ muted. The default is to set the mute flag for all channels.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="alsaaudio.Mixer.setrec">
|
||||
<code class="sig-prename descclassname">Mixer.</code><code class="sig-name descname">setrec</code><span class="sig-paren">(</span><em class="sig-param">capture</em><span class="optional">[</span>, <em class="sig-param">channel</em><span class="optional">]</span><span class="sig-paren">)</span><a class="headerlink" href="#alsaaudio.Mixer.setrec" title="Permalink to this definition">¶</a></dt>
|
||||
<dt class="sig sig-object py" id="alsaaudio.Mixer.setrec">
|
||||
<span class="sig-prename descclassname"><span class="pre">Mixer.</span></span><span class="sig-name descname"><span class="pre">setrec</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">capture</span></span></em><span class="optional">[</span>, <em class="sig-param"><span class="n"><span class="pre">channel</span></span></em><span class="optional">]</span><span class="sig-paren">)</span><a class="headerlink" href="#alsaaudio.Mixer.setrec" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Sets the capture mute flag to a new value. The <em>capture</em> argument
|
||||
is either 0 for no capture, or 1 for capture.</p>
|
||||
<p>The optional <em>channel</em> argument controls which channel is
|
||||
@@ -592,8 +681,8 @@ changed. The default is to set the capture flag for all channels.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="alsaaudio.Mixer.polldescriptors">
|
||||
<code class="sig-prename descclassname">Mixer.</code><code class="sig-name descname">polldescriptors</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#alsaaudio.Mixer.polldescriptors" title="Permalink to this definition">¶</a></dt>
|
||||
<dt class="sig sig-object py" id="alsaaudio.Mixer.polldescriptors">
|
||||
<span class="sig-prename descclassname"><span class="pre">Mixer.</span></span><span class="sig-name descname"><span class="pre">polldescriptors</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#alsaaudio.Mixer.polldescriptors" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Returns a tuple of <em>(file descriptor, eventmask)</em> that can be used to
|
||||
wait for changes on the mixer with <em>select.poll</em>.</p>
|
||||
<p>The <em>eventmask</em> value is compatible with <a class="reference external" href="http://docs.python.org/library/select.html#poll-objects">poll.register</a> in the Python
|
||||
@@ -601,8 +690,8 @@ wait for changes on the mixer with <em>select.poll</em>.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt id="alsaaudio.Mixer.handleevents">
|
||||
<code class="sig-prename descclassname">Mixer.</code><code class="sig-name descname">handleevents</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#alsaaudio.Mixer.handleevents" title="Permalink to this definition">¶</a></dt>
|
||||
<dt class="sig sig-object py" id="alsaaudio.Mixer.handleevents">
|
||||
<span class="sig-prename descclassname"><span class="pre">Mixer.</span></span><span class="sig-name descname"><span class="pre">handleevents</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#alsaaudio.Mixer.handleevents" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Acknowledge events on the <em>polldescriptors</em> file descriptors
|
||||
to prevent subsequent polls from returning the same events again.
|
||||
Returns the number of events that were acknowledged.</p>
|
||||
@@ -625,8 +714,8 @@ the availability of ALSA mixer capable devices will stay quite limited.</p>
|
||||
<p>Unfortunately, I’m not able to create such a HOWTO myself, since I only
|
||||
understand half of the API, and that which I do understand has come from a
|
||||
painful trial and error process.</p>
|
||||
</div>
|
||||
<div class="section" id="examples">
|
||||
</section>
|
||||
<section id="examples">
|
||||
<span id="pcm-example"></span><h2>Examples<a class="headerlink" href="#examples" title="Permalink to this headline">¶</a></h2>
|
||||
<p>The following example are provided:</p>
|
||||
<ul class="simple">
|
||||
@@ -650,15 +739,15 @@ painful trial and error process.</p>
|
||||
</div>
|
||||
<p>mixertest.py accepts the commandline options <em>-d <device></em> and
|
||||
<em>-c <cardindex></em>.</p>
|
||||
<div class="section" id="playwav-py">
|
||||
<section id="playwav-py">
|
||||
<h3>playwav.py<a class="headerlink" href="#playwav-py" title="Permalink to this headline">¶</a></h3>
|
||||
<p><strong>playwav.py</strong> plays a wav file.</p>
|
||||
<p>To test PCM playback (on your default soundcard), run:</p>
|
||||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ python playwav.py <wav file>
|
||||
</pre></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="section" id="recordtest-py-and-playbacktest-py">
|
||||
</section>
|
||||
<section id="recordtest-py-and-playbacktest-py">
|
||||
<h3>recordtest.py and playbacktest.py<a class="headerlink" href="#recordtest-py-and-playbacktest-py" title="Permalink to this headline">¶</a></h3>
|
||||
<p><strong>recordtest.py</strong> and <strong>playbacktest.py</strong> will record and play a raw
|
||||
sound file in CD quality.</p>
|
||||
@@ -672,8 +761,8 @@ with <code class="docutils literal notranslate"><span class="pre">Ctl-C</span></
|
||||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ python playbacktest.py <filename>
|
||||
</pre></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="section" id="mixertest-py">
|
||||
</section>
|
||||
<section id="mixertest-py">
|
||||
<h3>mixertest.py<a class="headerlink" href="#mixertest-py" title="Permalink to this headline">¶</a></h3>
|
||||
<p>Without arguments, <strong>mixertest.py</strong> will list all available <em>controls</em> on the
|
||||
default soundcard.</p>
|
||||
@@ -731,9 +820,9 @@ Channel 1 volume: 61%
|
||||
<dd><p>ALSA also allows <code class="docutils literal notranslate"><span class="pre">PCM_ASYNC</span></code>, but this is not supported yet.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</section>
|
||||
</section>
|
||||
|
||||
|
||||
</div>
|
||||
@@ -752,7 +841,7 @@ Channel 1 volume: 61%
|
||||
|
||||
|
||||
<h3>Navigation</h3>
|
||||
<p class="caption"><span class="caption-text">Contents:</span></p>
|
||||
<p class="caption" role="heading"><span class="caption-text">Contents:</span></p>
|
||||
<ul class="current">
|
||||
<li class="toctree-l1"><a class="reference internal" href="pyalsaaudio.html">Introduction</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="pyalsaaudio.html#what-is-alsa">What is ALSA</a></li>
|
||||
@@ -779,7 +868,7 @@ Channel 1 volume: 61%
|
||||
<h3 id="searchlabel">Quick search</h3>
|
||||
<div class="searchformwrapper">
|
||||
<form class="search" action="search.html" method="get">
|
||||
<input type="text" name="q" aria-labelledby="searchlabel" />
|
||||
<input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
|
||||
<input type="submit" value="Go" />
|
||||
</form>
|
||||
</div>
|
||||
@@ -801,7 +890,7 @@ Channel 1 volume: 61%
|
||||
©2017, Lars Immisch & Casper Wilstrup.
|
||||
|
||||
|
|
||||
Powered by <a href="http://sphinx-doc.org/">Sphinx 3.1.2</a>
|
||||
Powered by <a href="http://sphinx-doc.org/">Sphinx 4.5.0</a>
|
||||
& <a href="https://github.com/bitprophet/alabaster">Alabaster 0.7.12</a>
|
||||
|
||||
|
|
||||
|
||||
BIN
Binary file not shown.
+8
-9
@@ -4,15 +4,14 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Python Module Index — alsaaudio documentation 0.9.0 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>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>Python Module Index — alsaaudio documentation 0.9.1 documentation</title>
|
||||
<link rel="stylesheet" type="text/css" href="_static/pygments.css" />
|
||||
<link rel="stylesheet" type="text/css" href="_static/alabaster.css" />
|
||||
<script data-url_root="./" id="documentation_options" src="_static/documentation_options.js"></script>
|
||||
<script src="_static/jquery.js"></script>
|
||||
<script src="_static/underscore.js"></script>
|
||||
<script src="_static/doctools.js"></script>
|
||||
<script src="_static/language_data.js"></script>
|
||||
<link rel="index" title="Index" href="genindex.html" />
|
||||
<link rel="search" title="Search" href="search.html" />
|
||||
|
||||
@@ -73,7 +72,7 @@
|
||||
|
||||
|
||||
<h3>Navigation</h3>
|
||||
<p class="caption"><span class="caption-text">Contents:</span></p>
|
||||
<p class="caption" role="heading"><span class="caption-text">Contents:</span></p>
|
||||
<ul>
|
||||
<li class="toctree-l1"><a class="reference internal" href="pyalsaaudio.html">Introduction</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="pyalsaaudio.html#what-is-alsa">What is ALSA</a></li>
|
||||
@@ -94,7 +93,7 @@
|
||||
<h3 id="searchlabel">Quick search</h3>
|
||||
<div class="searchformwrapper">
|
||||
<form class="search" action="search.html" method="get">
|
||||
<input type="text" name="q" aria-labelledby="searchlabel" />
|
||||
<input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
|
||||
<input type="submit" value="Go" />
|
||||
</form>
|
||||
</div>
|
||||
@@ -116,7 +115,7 @@
|
||||
©2017, Lars Immisch & Casper Wilstrup.
|
||||
|
||||
|
|
||||
Powered by <a href="http://sphinx-doc.org/">Sphinx 3.1.2</a>
|
||||
Powered by <a href="http://sphinx-doc.org/">Sphinx 4.5.0</a>
|
||||
& <a href="https://github.com/bitprophet/alabaster">Alabaster 0.7.12</a>
|
||||
|
||||
</div>
|
||||
|
||||
+20
-20
@@ -4,15 +4,15 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Introduction — alsaaudio documentation 0.9.0 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>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="generator" content="Docutils 0.17.1: http://docutils.sourceforge.net/" />
|
||||
|
||||
<title>Introduction — alsaaudio documentation 0.9.1 documentation</title>
|
||||
<link rel="stylesheet" type="text/css" href="_static/pygments.css" />
|
||||
<link rel="stylesheet" type="text/css" href="_static/alabaster.css" />
|
||||
<script data-url_root="./" id="documentation_options" src="_static/documentation_options.js"></script>
|
||||
<script src="_static/jquery.js"></script>
|
||||
<script src="_static/underscore.js"></script>
|
||||
<script src="_static/doctools.js"></script>
|
||||
<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="PCM Terminology and Concepts" href="terminology.html" />
|
||||
@@ -33,7 +33,7 @@
|
||||
|
||||
<div class="body" role="main">
|
||||
|
||||
<div class="section" id="introduction">
|
||||
<section id="introduction">
|
||||
<h1>Introduction<a class="headerlink" href="#introduction" title="Permalink to this headline">¶</a></h1>
|
||||
<dl class="field-list simple">
|
||||
<dt class="field-odd">Author</dt>
|
||||
@@ -47,7 +47,7 @@
|
||||
majority of the python distribution. Basically you can use it for anything you
|
||||
wish (even commercial purposes). There is no warranty whatsoever.</p>
|
||||
<div class="topic">
|
||||
<p class="topic-title first">Abstract</p>
|
||||
<p class="topic-title">Abstract</p>
|
||||
<p>This package contains wrappers for accessing the ALSA API from Python. It is
|
||||
currently fairly complete for PCM devices and Mixer access. MIDI sequencer
|
||||
support is low on our priority list, but volunteers are welcome.</p>
|
||||
@@ -55,8 +55,8 @@ support is low on our priority list, but volunteers are welcome.</p>
|
||||
Please don’t send bug reports regarding ALSA specifically. There are several
|
||||
bugs in this API, and those should be reported to the ALSA team - not me.</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="section" id="what-is-alsa">
|
||||
</section>
|
||||
<section id="what-is-alsa">
|
||||
<h1>What is ALSA<a class="headerlink" href="#what-is-alsa" title="Permalink to this headline">¶</a></h1>
|
||||
<p>The Advanced Linux Sound Architecture (ALSA) provides audio and MIDI
|
||||
functionality to the Linux operating system.</p>
|
||||
@@ -72,7 +72,7 @@ all ALSA capable applications.</p></li>
|
||||
</ul>
|
||||
<p>More information about ALSA may be found on the project homepage
|
||||
<a class="reference external" href="http://www.alsa-project.org">http://www.alsa-project.org</a></p>
|
||||
<div class="section" id="alsa-and-python">
|
||||
<section id="alsa-and-python">
|
||||
<h2>ALSA and Python<a class="headerlink" href="#alsa-and-python" title="Permalink to this headline">¶</a></h2>
|
||||
<p>The older Linux sound API (OSS) which is now deprecated is well supported from
|
||||
the standard Python library, through the ossaudiodev module. No native ALSA
|
||||
@@ -87,9 +87,9 @@ the ALSA Mixer API.</p>
|
||||
<p>MIDI support is not available, and since I don’t own any MIDI hardware, it’s
|
||||
difficult for me to implement it. Volunteers to work on this would be greatly
|
||||
appreciated.</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="section" id="installation">
|
||||
</section>
|
||||
</section>
|
||||
<section id="installation">
|
||||
<h1>Installation<a class="headerlink" href="#installation" title="Permalink to this headline">¶</a></h1>
|
||||
<p>Note: the wrappers link with the alsasound library (from the alsa-lib package)
|
||||
and need the ALSA headers for compilation. Verify that you have
|
||||
@@ -107,8 +107,8 @@ ship with ALSA kernels.</p>
|
||||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="c1"># python setup.py install</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="section" id="testing">
|
||||
</section>
|
||||
<section id="testing">
|
||||
<h1>Testing<a class="headerlink" href="#testing" title="Permalink to this headline">¶</a></h1>
|
||||
<p>Make sure that <code class="code docutils literal notranslate"><span class="pre">aplay</span></code> plays a file through the soundcard you want, then
|
||||
try:</p>
|
||||
@@ -135,7 +135,7 @@ with <code class="docutils literal notranslate"><span class="pre">Ctl-C</span></
|
||||
a bit dependent on the ALSA configuration and may fail without indicating
|
||||
a real problem.</p>
|
||||
<p>If you find bugs/problems, please file a <a class="reference external" href="https://github.com/larsimmisch/pyalsaaudio/issues">bug report</a>.</p>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
|
||||
</div>
|
||||
@@ -154,7 +154,7 @@ a real problem.</p>
|
||||
|
||||
|
||||
<h3>Navigation</h3>
|
||||
<p class="caption"><span class="caption-text">Contents:</span></p>
|
||||
<p class="caption" role="heading"><span class="caption-text">Contents:</span></p>
|
||||
<ul class="current">
|
||||
<li class="toctree-l1 current"><a class="current reference internal" href="#">Introduction</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="#what-is-alsa">What is ALSA</a><ul>
|
||||
@@ -180,7 +180,7 @@ a real problem.</p>
|
||||
<h3 id="searchlabel">Quick search</h3>
|
||||
<div class="searchformwrapper">
|
||||
<form class="search" action="search.html" method="get">
|
||||
<input type="text" name="q" aria-labelledby="searchlabel" />
|
||||
<input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
|
||||
<input type="submit" value="Go" />
|
||||
</form>
|
||||
</div>
|
||||
@@ -202,7 +202,7 @@ a real problem.</p>
|
||||
©2017, Lars Immisch & Casper Wilstrup.
|
||||
|
||||
|
|
||||
Powered by <a href="http://sphinx-doc.org/">Sphinx 3.1.2</a>
|
||||
Powered by <a href="http://sphinx-doc.org/">Sphinx 4.5.0</a>
|
||||
& <a href="https://github.com/bitprophet/alabaster">Alabaster 0.7.12</a>
|
||||
|
||||
|
|
||||
|
||||
+20
-11
@@ -4,17 +4,17 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Search — alsaaudio documentation 0.9.0 documentation</title>
|
||||
<link rel="stylesheet" href="_static/alabaster.css" type="text/css" />
|
||||
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>Search — alsaaudio documentation 0.9.1 documentation</title>
|
||||
<link rel="stylesheet" type="text/css" href="_static/pygments.css" />
|
||||
<link rel="stylesheet" type="text/css" href="_static/alabaster.css" />
|
||||
|
||||
<script id="documentation_options" data-url_root="./" src="_static/documentation_options.js"></script>
|
||||
<script data-url_root="./" id="documentation_options" src="_static/documentation_options.js"></script>
|
||||
<script src="_static/jquery.js"></script>
|
||||
<script src="_static/underscore.js"></script>
|
||||
<script src="_static/doctools.js"></script>
|
||||
<script src="_static/language_data.js"></script>
|
||||
<script src="_static/searchtools.js"></script>
|
||||
<script src="_static/language_data.js"></script>
|
||||
<link rel="index" title="Index" href="genindex.html" />
|
||||
<link rel="search" title="Search" href="#" />
|
||||
<script src="searchindex.js" defer></script>
|
||||
@@ -37,26 +37,35 @@
|
||||
<div class="body" role="main">
|
||||
|
||||
<h1 id="search-documentation">Search</h1>
|
||||
<div id="fallback" class="admonition warning">
|
||||
<script>$('#fallback').hide();</script>
|
||||
|
||||
<noscript>
|
||||
<div class="admonition warning">
|
||||
<p>
|
||||
Please activate JavaScript to enable the search
|
||||
functionality.
|
||||
</p>
|
||||
</div>
|
||||
</noscript>
|
||||
|
||||
|
||||
<p>
|
||||
Searching for multiple words only shows matches that contain
|
||||
all words.
|
||||
</p>
|
||||
|
||||
|
||||
<form action="" method="get">
|
||||
<input type="text" name="q" aria-labelledby="search-documentation" value="" />
|
||||
<input type="text" name="q" aria-labelledby="search-documentation" value="" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
|
||||
<input type="submit" value="search" />
|
||||
<span id="search-progress" style="padding-left: 10px"></span>
|
||||
</form>
|
||||
|
||||
|
||||
|
||||
<div id="search-results">
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
@@ -74,7 +83,7 @@
|
||||
|
||||
|
||||
<h3>Navigation</h3>
|
||||
<p class="caption"><span class="caption-text">Contents:</span></p>
|
||||
<p class="caption" role="heading"><span class="caption-text">Contents:</span></p>
|
||||
<ul>
|
||||
<li class="toctree-l1"><a class="reference internal" href="pyalsaaudio.html">Introduction</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="pyalsaaudio.html#what-is-alsa">What is ALSA</a></li>
|
||||
@@ -107,7 +116,7 @@
|
||||
©2017, Lars Immisch & Casper Wilstrup.
|
||||
|
||||
|
|
||||
Powered by <a href="http://sphinx-doc.org/">Sphinx 3.1.2</a>
|
||||
Powered by <a href="http://sphinx-doc.org/">Sphinx 4.5.0</a>
|
||||
& <a href="https://github.com/bitprophet/alabaster">Alabaster 0.7.12</a>
|
||||
|
||||
</div>
|
||||
|
||||
+1
-1
File diff suppressed because one or more lines are too long
+11
-11
@@ -4,15 +4,15 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>PCM Terminology and Concepts — alsaaudio documentation 0.9.0 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>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="generator" content="Docutils 0.17.1: http://docutils.sourceforge.net/" />
|
||||
|
||||
<title>PCM Terminology and Concepts — alsaaudio documentation 0.9.1 documentation</title>
|
||||
<link rel="stylesheet" type="text/css" href="_static/pygments.css" />
|
||||
<link rel="stylesheet" type="text/css" href="_static/alabaster.css" />
|
||||
<script data-url_root="./" id="documentation_options" src="_static/documentation_options.js"></script>
|
||||
<script src="_static/jquery.js"></script>
|
||||
<script src="_static/underscore.js"></script>
|
||||
<script src="_static/doctools.js"></script>
|
||||
<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="alsaaudio" href="libalsaaudio.html" />
|
||||
@@ -33,7 +33,7 @@
|
||||
|
||||
<div class="body" role="main">
|
||||
|
||||
<div class="section" id="pcm-terminology-and-concepts">
|
||||
<section id="pcm-terminology-and-concepts">
|
||||
<h1>PCM Terminology and Concepts<a class="headerlink" href="#pcm-terminology-and-concepts" title="Permalink to this headline">¶</a></h1>
|
||||
<p>In order to use PCM devices it is useful to be familiar with some concepts and
|
||||
terminology.</p>
|
||||
@@ -98,7 +98,7 @@ read will return either 32 frames of data or nothing at all.</p>
|
||||
</dl>
|
||||
<p>Once you understand these concepts, you will be ready to use the PCM API. Read
|
||||
on.</p>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
|
||||
</div>
|
||||
@@ -117,7 +117,7 @@ on.</p>
|
||||
|
||||
|
||||
<h3>Navigation</h3>
|
||||
<p class="caption"><span class="caption-text">Contents:</span></p>
|
||||
<p class="caption" role="heading"><span class="caption-text">Contents:</span></p>
|
||||
<ul class="current">
|
||||
<li class="toctree-l1"><a class="reference internal" href="pyalsaaudio.html">Introduction</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="pyalsaaudio.html#what-is-alsa">What is ALSA</a></li>
|
||||
@@ -140,7 +140,7 @@ on.</p>
|
||||
<h3 id="searchlabel">Quick search</h3>
|
||||
<div class="searchformwrapper">
|
||||
<form class="search" action="search.html" method="get">
|
||||
<input type="text" name="q" aria-labelledby="searchlabel" />
|
||||
<input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
|
||||
<input type="submit" value="Go" />
|
||||
</form>
|
||||
</div>
|
||||
@@ -162,7 +162,7 @@ on.</p>
|
||||
©2017, Lars Immisch & Casper Wilstrup.
|
||||
|
||||
|
|
||||
Powered by <a href="http://sphinx-doc.org/">Sphinx 3.1.2</a>
|
||||
Powered by <a href="http://sphinx-doc.org/">Sphinx 4.5.0</a>
|
||||
& <a href="https://github.com/bitprophet/alabaster">Alabaster 0.7.12</a>
|
||||
|
||||
|
|
||||
|
||||
Reference in New Issue
Block a user