title: BpMemoryHeap issue with app that involves soundpool
body: <p>I have created an app that involves about 600 small ogg files. Total around 15MB. Each file will have avg. of 6 seconds sound. This is not a game app but learning app for children. </p>
  
  <p>I tried loading the sounds on Media player. It works fine once and when continuously played I end up getting no sound. It is blank.</p>
  
  <p>So I tried sound pool option. Sounds are played only after the it loads to soundpool loader. hence I tried loading the sounds in the start of the app. So it takes about 30 seconds to load the sounds and main screen shows up after that (I am loading the sounds using Async in background and progress bar is shown in the front). </p>
  
  <p>This setup works just fine for about 450 ogg files when I add one sound more than 450 I get heap error on loading couple of sounds and app force closes with the below error:</p>
  
  <pre><code> 02-27 07:13:02.614: I/Choreographer(27172): Skipped 35 frames!  The application may be doing too much work on its main thread.
   02-27 07:13:11.012: E/IMemory(27172): binder=0x56f0c430 transaction failed fd=-2147483647, size=0, err=-2147483646 (Unknown error 2147483646)
   02-27 07:13:11.012: E/IMemory(27172): cannot dup fd=-2147483647, size=0, err=-2147483646 (Bad file number)
   02-27 07:13:11.012: E/IMemory(27172): cannot map BpMemoryHeap (binder=0x56f0c430), size=0, fd=-1 (Bad file number)
   02-27 07:13:11.020: W/dalvikvm(27172): threadid=37: thread exiting with uncaught exception (group=0x40d75930)
   02-27 07:13:11.153: E/IMemory(27172): cannot dup fd=818, size=1048576, err=0 (Too many open files)
   02-27 07:13:11.153: E/IMemory(27172): cannot map BpMemoryHeap (binder=0x56f09e80), size=1048576, fd=-1 (Bad file number)
   02-27 07:13:11.403: E/IMemory(27172): cannot dup fd=972, size=1048576, err=0 (Too many open files)
   02-27 07:13:11.403: E/IMemory(27172): cannot map BpMemoryHeap (binder=0x56f09988), size=1048576, fd=-1 (Bad file number)
   02-27 07:13:11.450: E/IMemory(27172): cannot dup fd=873, size=1048576, err=0 (Too many open files)
   02-27 07:13:11.450: E/IMemory(27172): cannot map BpMemoryHeap (binder=0x56f0a500), size=1048576, fd=-1 (Bad file number)
   02-27 07:13:11.520: E/IMemory(27172): cannot dup fd=954, size=1048576, err=0 (Too many open files)
   02-27 07:13:11.520: E/IMemory(27172): cannot map BpMemoryHeap (binder=0x56efbde8), size=1048576, fd=-1 (Bad file number)
   02-27 07:13:11.614: W/dalvikvm(27172): threadid=35: thread exiting with uncaught exception (group=0x40d75930)
   02-27 07:13:11.677: E/IMemory(27172): cannot dup fd=903, size=1048576, err=0 (Too many open files)
   02-27 07:13:11.677: E/IMemory(27172): cannot map BpMemoryHeap (binder=0x56f09b30), size=1048576, fd=-1 (Bad file number)
   02-27 07:13:11.716: E/IMemory(27172): cannot dup fd=978, size=1048576, err=0 (Too many open files)
   02-27 07:13:11.716: E/IMemory(27172): cannot map BpMemoryHeap (binder=0x5d99add0), size=1048576, fd=-1 (Bad file number) 
   02-27 07:13:11.747: E/IMemory(27172): cannot dup fd=941, size=1048576, err=0 (Too many open files)
   02-27 07:13:11.747: E/IMemory(27172): cannot map BpMemoryHeap (binder=0x56efb710), size=1048576, fd=-1 (Bad file number)
   02-27 07:13:11.809: E/IMemory(27172): cannot dup fd=991, size=1048576, err=0 (Too many open files)
   02-27 07:13:11.809: E/IMemory(27172): cannot map BpMemoryHeap (binder=0x56efaa90), size=1048576, fd=-1 (Bad file number)
  </code></pre>
  
  <p>How do I fix this issue? most of the issue on Heap is about database cursor not with soundpool. </p>
  
  <p>if this can't be solved what is a work around on using soundpool when I have 600 sounds to load?</p>
  
  <p>Thanks!</p>