Re: Wavread a large file
- From: "Ah Koh" <koh@xxxxxxxxxxxxx>
- Date: Thu, 18 Aug 2005 11:33:31 +0800
Thank you.
I have the wav format spec. and almost going to write using C++, till i read
the word 'audacity'!
Cool utility. Thanks again.
Koh
----------------------------------------------------------------------------
--------
He who ask maybe a fool for five minutes, he who don't ask maybe a fool
forever
----------------------------------------------------------------------------
--------
"Rune Allnor" <allnor@xxxxxxxxxxxx> wrote in message
news:1124273546.988843.105710@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
>
> Ah Koh skrev:
> > Hello world,
> >
> > i'm trying to extract 1 channel from a stereo wave file.
> > i tried using the wavread, and, wrote a small function to read the wave
file
> > and extract 1 channel and write to a file.
> > The problem is both method casues OUT OF MEMORY.
> > Btw, the wav file size is about 100~200 Mb. I'd increase my virtual
memory
> > to max (4GB), and my RAM is 2GB.
> > Wondering why it still run out of memory.
> > Is there any other ways to read the wav file?
>
> It may be that the number formats are part of the problem. If we
> assume the original data are stored as 16 bit integers in the .wav
> file, the variables in matlab will be 4 times larger since matlab
> uses 64 bit double precision storage format. So one would expect
> that the data themselves would be on the order of 400 Mb. Add to
> that a copy of your channel 1, another 200 Mb, and we are talking
> about close to 1 Gb of data, all in all.
>
> To overcome the problems, try to close don as much as possible
> of the other programs running on your computer. Depending on
> your operating system, you may have only 2 Gb addressing space
> available in total, so adding ram and virtual memory beyond 2 Gb
> need not help much.
>
> If this fails, you might be able to import the data as 16 bit integers,
>
> saving exess memory. I don't know if matlab lets you do that, though,
> or if it just pops out double floats no matter what.
>
> If that doesn't work, you will have to use another program to
> do the job for you. Perhaps audacity can do the job for you,
> or if you can find the documentation of the .wav format, you might
> have to write a C/C++ program yourself.
>
> Rune
>
.
- References:
- Wavread a large file
- From: Ah Koh
- Re: Wavread a large file
- From: Rune Allnor
- Wavread a large file
- Prev by Date: how to take off "number" in x-axis and y-axis?
- Next by Date: @ Question
- Previous by thread: Re: Wavread a large file
- Next by thread: Command line arguments for external programs
- Index(es):
Relevant Pages
|