Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
cpython
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
cpython
Commits
d5da7a63
Kaydet (Commit)
d5da7a63
authored
Kas 24, 1997
tarafından
Guido van Rossum
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Get rid of last traces of module 'audio'
üst
ca83f018
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
2 additions
and
123 deletions
+2
-123
lib.tex
Doc/lib.tex
+1
-1
lib.tex
Doc/lib/lib.tex
+1
-1
libaudio.tex
Doc/libaudio.tex
+0
-121
No files found.
Doc/lib.tex
Dosyayı görüntüle @
d5da7a63
...
...
@@ -212,7 +212,7 @@ to Python and how to embed it in other applications.
\input
{
libsgi
}
% SGI IRIX ONLY
\input
{
libal
}
%
\input{libaudio}
\input
{
libaudio
}
\input
{
libcd
}
\input
{
libfl
}
\input
{
libfm
}
...
...
Doc/lib/lib.tex
Dosyayı görüntüle @
d5da7a63
...
...
@@ -212,7 +212,7 @@ to Python and how to embed it in other applications.
\input
{
libsgi
}
% SGI IRIX ONLY
\input
{
libal
}
%
\input{libaudio}
\input
{
libaudio
}
\input
{
libcd
}
\input
{
libfl
}
\input
{
libfm
}
...
...
Doc/libaudio.tex
deleted
100644 → 0
Dosyayı görüntüle @
ca83f018
\section
{
Built-in Module
\sectcode
{
audio
}}
\label
{
module-audio
}
\bimodindex
{
audio
}
\strong
{
Note:
}
This module is obsolete, since the hardware to which it
interfaces is obsolete. For audio on the Indigo or 4D/35, see
built-in module
\code
{
al
}
above.
This module provides rudimentary access to the audio I/O device
\file
{
/dev/audio
}
on the Silicon Graphics Personal IRIS 4D/25;
see
{
\it
audio
}
(7). It supports the following operations:
\renewcommand
{
\indexsubitem
}{
(in module audio)
}
\begin{funcdesc}
{
setoutgain
}{
n
}
Sets the output gain.
\iftexi
\code
{
0 <=
\var
{
n
}
< 256
}
.
\else
$
0
\leq
\var
{
n
}
<
256
$
.
%%JHXXX Sets the output gain (0-255).
\fi
\end{funcdesc}
\begin{funcdesc}
{
getoutgain
}{}
Returns the output gain.
\end{funcdesc}
\begin{funcdesc}
{
setrate
}{
n
}
Sets the sampling rate:
\code
{
1
}
= 32K/sec,
\code
{
2
}
= 16K/sec,
\code
{
3
}
= 8K/sec.
\end{funcdesc}
\begin{funcdesc}
{
setduration
}{
n
}
Sets the `sound duration' in units of 1/100 seconds.
\end{funcdesc}
\begin{funcdesc}
{
read
}{
n
}
Reads a chunk of
\var
{
n
}
sampled bytes from the audio input (line in or microphone).
The chunk is returned as a string of length n.
Each byte encodes one sample as a signed 8-bit quantity using linear
encoding.
This string can be converted to numbers using
\code
{
chr2num()
}
described
below.
\end{funcdesc}
\begin{funcdesc}
{
write
}{
buf
}
Writes a chunk of samples to the audio output (speaker).
\end{funcdesc}
These operations support asynchronous audio I/O:
\renewcommand
{
\indexsubitem
}{
(in module audio)
}
\begin{funcdesc}
{
start
_
recording
}{
n
}
Starts a second thread (a process with shared memory) that begins reading
\var
{
n
}
bytes from the audio device.
The main thread immediately continues.
\end{funcdesc}
\begin{funcdesc}
{
wait
_
recording
}{}
Waits for the second thread to finish and returns the data read.
\end{funcdesc}
\begin{funcdesc}
{
stop
_
recording
}{}
Makes the second thread stop reading as soon as possible.
Returns the data read so far.
\end{funcdesc}
\begin{funcdesc}
{
poll
_
recording
}{}
Returns true if the second thread has finished reading (so
\code
{
wait
_
recording()
}
would return the data without delay).
\end{funcdesc}
\begin{funcdesc}
{
start
_
playing
}{}
\funcline
{
wait
_
playing
}{}
\funcline
{
stop
_
playing
}{}
\funcline
{
poll
_
playing
}{}
\begin{sloppypar}
Similar but for output.
\code
{
stop
_
playing()
}
returns a lower bound for the number of bytes actually played (not very
accurate).
\end{sloppypar}
\end{funcdesc}
The following operations do not affect the audio device but are
implemented in C for efficiency:
\renewcommand
{
\indexsubitem
}{
(in module audio)
}
\begin{funcdesc}
{
amplify
}{
buf
\,
f1
\,
f2
}
Amplifies a chunk of samples by a variable factor changing from
\code
{
\var
{
f1
}
/256
}
to
\code
{
\var
{
f2
}
/256.
}
Negative factors are allowed.
Resulting values that are to large to fit in a byte are clipped.
\end{funcdesc}
\begin{funcdesc}
{
reverse
}{
buf
}
Returns a chunk of samples backwards.
\end{funcdesc}
\begin{funcdesc}
{
add
}{
buf1
\,
buf2
}
Bytewise adds two chunks of samples.
Bytes that exceed the range are clipped.
If one buffer is shorter, it is assumed to be padded with zeros.
\end{funcdesc}
\begin{funcdesc}
{
chr2num
}{
buf
}
Converts a string of sampled bytes as returned by
\code
{
read()
}
into
a list containing the numeric values of the samples.
\end{funcdesc}
\begin{funcdesc}
{
num2chr
}{
list
}
\begin{sloppypar}
Converts a list as returned by
\code
{
chr2num()
}
back to a buffer acceptable by
\code
{
write()
}
.
\end{sloppypar}
\end{funcdesc}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment