Reading portions of a wave file

N

Nadie

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.

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.

Thanks,
Marie

If you have a suggestion and prefer to send e-mail, please send it to
"nospam" with the domain from the bogus address listed above.
 
B

Bengt Richter

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.

Regards,
Bengt Richter
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,011
Latest member
AjaUqq1950

Latest Threads

Top