473,382 Members | 1,305 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

Reading portions of a wave file

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.
Aug 16 '05 #1
1 2069
On Tue, 16 Aug 2005 02:33:36 GMT, Nadie <Na***@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.

Regards,
Bengt Richter
Aug 16 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: david.kettle | last post by:
Hello Python World! I've been playing with the 'wave' and 'audioop' modules in the library, and I have a question. When I tried to read a "wav" file with samples in 32-bit float, I got the...
1
by: Jakub Dudek | last post by:
Hi, I am trying to read wave date (the 16 bits audio words) from a wave file using c++. I have tried using the mmsystems library. I got to the point where I read the wave data chunk into a...
4
by: vikram | last post by:
in a stereo type of wave file i want to know what is this left & right info in a wave file??? how do i read the left & right info from a .wav file to a buffer..
3
by: VenuGopal | last post by:
hi, i want to store the WAVE FILE CONTENTS in an XML. How do i do it? thanks Venugopal
4
by: Erpman | last post by:
I am trying to access the data with in a wav file. I am testing with very small files in order to keep the code simple to start with. Basically, im writing the entire wav file to a byte using a...
5
by: m.topczewski | last post by:
Hello, I'm a beginner in c++, i have to write a program that will take couple of segments from one wave file, and store them in another wave file to be played back later. Here's the code i have...
0
by: Simrat Kaur Sandhu | last post by:
hello friends can anybody tell me how to read data from a wave file.. i have writen code as ... class file { private: FILE *fp; char id; char *sound_buffer; //four bytes to hold 'RIFF' long...
6
by: homevista | last post by:
PART III: Putting things together In part I we examined the modem to verify that it supported voice. If so, we took a note about the voice data format that we would use. In the second part, we...
1
by: subhakohila | last post by:
Hi, Can any one help me to read the wave file and pass through the modem to the telephone line....I tried with some set of codings but its returning some garbage values.... The coding i...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.