Re: Wavread a large file



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
>


.



Relevant Pages

  • Re: Memory Leak in DirectShow
    ... Play the wav file when there is an event. ... Thread 2 Waits for the acknowledgedment of event and stops playing the .wav ... So when an event occurs memory is allocated and the .wav file is played. ...
    (microsoft.public.win32.programmer.directx.video)
  • Re: How do I embed music in PP show & email in less than 10 MB?
    ... Unfortunately the .wav format is one of the largest file sizes... ... Flash uses .mp3 to encode, ...
    (microsoft.public.powerpoint)
  • Re: Putting together wav fles
    ... Sadly I can't help you with any of the actual coding because I don't know the details of the .wav format. ... I do graphics myself and VB6 is just as fast as C# when manipulating raw graphics data, so it will certainly be just the same when manipulating raw wav file data. ...
    (microsoft.public.vb.general.discussion)
  • Re: Help with speaker code VB6
    ... >Using the API PlaySound in the past I've ... >loaded WAVs into a string array and playing them from there (you pass ... >pseudo-buffer lots of WAVs in memory) although this 'feels' like a hack. ... I've written the stream out to a file with a .wav extention ...
    (comp.lang.basic.visual.misc)
  • Re: WAV File Header Format.
    ... I am trying to append a standard WAV file header (which I believe is ... I am using a utility called HexEdit to view the source RAW file as well ... of the standard WAV format) I'll be really thankful. ...
    (comp.dsp)