[python-win32] using the wave module for reading wave files
Tim Roberts
timr at probo.com
Tue May 20 18:55:14 CEST 2008
Tony Cappellini wrote:
>
> In the wave module, is the term "frame" synonymous with sample?
> That is, does the method wave.readframes(1) read a sample that is
> getsampwidth() bits wide, where each sample was sampled at the
> frequency found at wave.getframerate() ?
The nice thing about Python is that you can go look in the source.
wave.py is in the standard library.
Each "frame" is sample width X number of channels. If you have a
44100-S-16 audio stream, each frame is 4 bytes (stereo x 16 bits per
sample).
--
Tim Roberts, timr at probo.com
Providenza & Boekelheide, Inc.
More information about the python-win32
mailing list