This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: small change in ossaudiodev module doc.
Type: Stage:
Components: Documentation Versions: Python 2.4
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: gward Nosy List: gward, hiower
Priority: normal Keywords:

Created on 2005-03-23 16:10 by hiower, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Messages (2)
msg24771 - (view) Author: hiower (hiower) Date: 2005-03-23 16:10
from
http://docs.python.org/lib/ossaudio-device-objects.html:

AFMT_U8  	Unsigned, 8-bit audio
AFMT_S16_LE 	Unsigned, 16-bit audio, little-endian byte
order
		(as used by Intel processors)
AFMT_S16_BE 	Unsigned, 16-bit audio, big-endian byte order
		(as used by 68k, PowerPC, Sparc)
AFMT_S8 	Signed, 8 bit audio
AFMT_U16_LE 	Signed, 16-bit little-endian audio
AFMT_U16_BE 	Signed, 16-bit big-endian audio

Note how the U:s and S:s are switched compared to
signed and unsigned, this should surely not be like this? 

Perhaps AFMT_AC3 and AFMT_S16_NE should be included as
well? (if anyone uses it?)


also, maybe this line:

write(  data)
    Write the Python string data to the audio device
and return the number of bytes written.

could be subtituted with something like this:

write(  data)
    Write the Python data to the audio device and
return the number of bytes written. The data should be
a string or a list (of amplitude values...something)
msg24772 - (view) Author: Greg Ward (gward) (Python committer) Date: 2005-03-28 02:41
Logged In: YES 
user_id=14422

Oops, good catch on the signed/unsigned thing.  Thanks!

Fixed on release24-maint branch: Doc/lib/libossaudiodev.tex
rev 1.12.4.4.
Merged to trunk: Doc/lib/libossaudiodev.tex rev 1.15.

As for explaining the write() method: the ossaudiodev docs
are no place for a tutorial on audio encoding formats.  If
it's not immediately obvious what the string passed to
write() should be, the reader should consult OSS docs.

Hmmm... since AFMT_S16_NE may be defined by ossaudiodev, but
AFMT_U16_NE is not, I'll just leave the missing AFMT_*'s out
of the 2.4 docs and straighten things out on the trunk (for
2.5).  Specifically, I'll make ossaudiodev conditionally
define all AFMT_* macros currently documented by OSS.  Won't
bother adding everything to the docs, since the OSS ref
should be definitive.
History
Date User Action Args
2022-04-11 14:56:10adminsetgithub: 41749
2005-03-23 16:10:39hiowercreate