Reading portions of a wave file
bokr at oz.net
Tue Aug 16 20:56:20 CEST 2005
On Tue, 16 Aug 2005 02:33:36 GMT, Nadie <Nadie at san.rr.com> wrote:
>Greeting list readers,
>I noticed that the wave read object has an *implementation dependent*
>setpos(pos) method. When reading audio files, it is useful to be able
>to set the position to a specific sample. While setpos(pos) may do this
>on certain implementations (haven't tried it), it would not be a
>reliable way to do it in a platform independent manner.
How do you know this? I don't know either way, but superficially it
looks like the wave.py author tried to do "the right thing."
>Is anyone familiar with an alternative wave package that would let one
>arbitrarily access portions of a wave file? Clearly, one can read in up
>to the desired point, but when the file is very large, this becomes an
>inappropriate way of doing things.
Why don't you at least try setpos, and fix it if there's a problem?
Or report on the problem you _actually_ encounter, which could be useful.
That much can't be much harder than looking for an alternative, and may
inspire others to help make/find a workable solution for you.
More information about the Python-list