[Scipy-tickets] [SciPy] #1455: Use mmap to read wav files

SciPy Trac scipy-tickets@scipy....
Tue Jun 7 18:11:01 CDT 2011


#1455: Use mmap to read wav files
-------------------------+--------------------------------------------------
 Reporter:  bemasc       |       Owner:  somebody
     Type:  enhancement  |      Status:  new     
 Priority:  normal       |   Milestone:          
Component:  Other        |     Version:  0.9.0   
 Keywords:               |  
-------------------------+--------------------------------------------------
 I'm trying to work with 700MB WAV files, with the result that my laptop is
 always swapping when I use scipy.io.wavfile.read.  This is unnecessary,
 because WAV files are perfectly structured for mmap.

 This patch changes wavfile.read to use mmap to construct arrays.  The
 arrays are copy-on-write, so the observed behaviors should all be
 unchanged, except that read() will return immediately, load data as
 necessary, and let the kernel manage the memory.

-- 
Ticket URL: <http://projects.scipy.org/scipy/ticket/1455>
SciPy <http://www.scipy.org>
SciPy is open-source software for mathematics, science, and engineering.


More information about the Scipy-tickets mailing list