title: Some (not all) wav files don't work in pygame
body: <p>My program was crashing while loading a .wav file in pygame. I didn't manage to figure out what was wrong, so I changed the .wav file with another and it worked. I then tried a bunch of different ones to see if it was just that one file that wasn't working, but it turns out some of them work and some of them don't. All of the files work fine when played on my media player.</p>
  
  <p>I am running the program from Spyder 2.3.8 with Python 3.5.2 64bits on Linux.</p>
  
  <p>So I might type:</p>
  
  <pre><code>&gt;&gt;&gt; import pygame
  &gt;&gt;&gt; pygame.mixer.init(22050, -16, 2, 4096)
  &gt;&gt;&gt; bob = pygame.mixer.Sound('beep.wav')
  &gt;&gt;&gt; bob.play()
  </code></pre>
  
  <p>And will get the following output while hearing a nice little beep:</p>
  
  <pre><code>&lt;Channel object at 0x7fe31f5ca558&gt;
  </code></pre>
  
  <p>But then I type nearly the exact same thing (except I don't even get to the play method because it crashes before):</p>
  
  <pre><code>&gt;&gt;&gt; import pygame
  &gt;&gt;&gt; pygame.mixer.init(22050, -16, 2, 4096)
  &gt;&gt;&gt; bob = pygame.mixer.Sound('spell.wav')
  </code></pre>
  
  <p>And my console will freeze and I get this (I couldn't copy paste the whole thing because it's too long):</p>
  
  <pre><code>7f8092fce000-7f8092fcf000 r-xp 00000000 08:02 951168       /usr/lib/python3.5/lib-dynload/_opcode.cpython-35m-x86_64-linux-gnu.so
  7f8092fcf000-7f80931ce000 ---p 00001000 08:02 951168       /usr/lib/python3.5/lib-dynload/_opcode.cpython-35m-x86_64-linux-gnu.so
  7f80931ce000-7f80931cf000 r--p 00000000 08:02 951168       /usr/lib/python3.5/lib-dynload/_opcode.cpython-35m-x86_64-linux-gnu.so
  7f80931cf000-7f80931d0000 rw-p 00001000 08:02 951168       /usr/lib/python3.5/lib-dynload/_opcode.cpython-35m-x86_64-linux-gnu.so
  7f80931f1000-7f8093331000 rw-p 00000000 00:00 0 
  7f8093331000-7f809373a000 r--p 00000000 08:02 921965       /usr/lib/locale/locale-archive
  7f809373a000-7f8093842000 r-xp 00000000 08:02 10002184       /lib/x86_64-linux-gnu/libm-2.23.so
  7f8093842000-7f8093a41000 ---p 00108000 08:02 10002184       /lib/x86_64-linux-gnu/libm-2.23.so
  7f8093a41000-7f8093a42000 r--p 00107000 08:02 10002184       /lib/x86_64-linux-gnu/libm-2.23.so
  7f8093a42000-7f8093a43000 rw-p 00108000 08:02 10002184       /lib/x86_64-linux-gnu/libm-2.23.so
  7f8093a43000-7f8093a5c000 r-xp 00000000 08:02 9984920      /lib/x86_64-linux-gnu/libz.so.1.2.8
  7f8093a5c000-7f8093c5b000 ---p 00019000 08:02 9984920      /lib/x86_64-linux-gnu/libz.so.1.2.8
  7f8093c5b000-7f8093c5c000 r--p 00018000 08:02 9984920      /lib/x86_64-linux-gnu/libz.so.1.2.8
  7f8093c5c000-7f8093c5d000 rw-p 00019000 08:02 9984920      /lib/x86_64-linux-gnu/libz.so.1.2.8
  7f8093c5d000-7f8093c83000 r-xp 00000000 08:02 9981005      /lib/x86_64-linux-gnu/libexpat.so.1.6.0
  7f8093c83000-7f8093e83000 ---p 00026000 08:02 9981005      /lib/x86_64-linux-gnu/libexpat.so.1.6.0
  7f8093e83000-7f8093e85000 r--p 00026000 08:02 9981005      /lib/x86_64-linux-gnu/libexpat.so.1.6.0
  7f8093e85000-7f8093e86000 rw-p 00028000 08:02 9981005      /lib/x86_64-linux-gnu/libexpat.so.1.6.0
  7f8093e86000-7f8093e88000 r-xp 00000000 08:02 9997250      /lib/x86_64-linux-gnu/libutil-2.23.so
  7f8093e88000-7f8094087000 ---p 00002000 08:02 9997250      /lib/x86_64-linux-gnu/libutil-2.23.so
  7f8094087000-7f8094088000 r--p 00001000 08:02 9997250      /lib/x86_64-linux-gnu/libutil-2.23.so
  7f8094088000-7f8094089000 rw-p 00002000 08:02 9997250      /lib/x86_64-linux-gnu/libutil-2.23.so
  7f8094089000-7f809408c000 r-xp 00000000 08:02 10002178       /lib/x86_64-linux-gnu/libdl-2.23.so
  7f809408c000-7f809428b000 ---p 00003000 08:02 10002178       /lib/x86_64-linux-gnu/libdl-2.23.so
  7f809428b000-7f809428c000 r--p 00002000 08:02 10002178       /lib/x86_64-linux-gnu/libdl-2.23.so
  7f809428c000-7f809428d000 rw-p 00003000 08:02 10002178       /lib/x86_64-linux-gnu/libdl-2.23.so
  7f809428d000-7f809444c000 r-xp 00000000 08:02 10002179       /lib/x86_64-linux-gnu/libc-2.23.so
  7f809444c000-7f809464c000 ---p 001bf000 08:02 10002179       /lib/x86_64-linux-gnu/libc-2.23.so
  7f809464c000-7f8094650000 r--p 001bf000 08:02 10002179       /lib/x86_64-linux-gnu/libc-2.23.so
  7f8094650000-7f8094652000 rw-p 001c3000 08:02 10002179       /lib/x86_64-linux-gnu/libc-2.23.so
  7f8094652000-7f8094656000 rw-p 00000000 00:00 0 
  7f8094656000-7f809466e000 r-xp 00000000 08:02 10002185       /lib/x86_64-linux-gnu/libpthread-2.23.so
  7f809466e000-7f809486d000 ---p 00018000 08:02 10002185       /lib/x86_64-linux-gnu/libpthread-2.23.so
  7f809486d000-7f809486e000 r--p 00017000 08:02 10002185       /lib/x86_64-linux-gnu/libpthread-2.23.so
  7f809486e000-7f809486f000 rw-p 00018000 08:02 10002185       /lib/x86_64-linux-gnu/libpthread-2.23.so
  7f809486f000-7f8094873000 rw-p 00000000 00:00 0 
  7f8094873000-7f8094899000 r-xp 00000000 08:02 9993856      /lib/x86_64-linux-gnu/ld-2.23.so
  7f80948ab000-7f8094a70000 rw-p 00000000 00:00 0 
  7f8094a8d000-7f8094a8e000 rw-p 00000000 00:00 0 
  7f8094a8e000-7f8094a8f000 rwxp 00000000 00:00 0 
  7f8094a8f000-7f8094a96000 r--s 00000000 08:02 1323058      /usr/lib/x86_64-linux-gnu/gconv/gconv-modules.cache
  7f8094a96000-7f8094a98000 rw-p 00000000 00:00 0 
  7f8094a98000-7f8094a99000 r--p 00025000 08:02 9993856      /lib/x86_64-linux-gnu/ld-2.23.so
  7f8094a99000-7f8094a9a000 rw-p 00026000 08:02 9993856      /lib/x86_64-linux-gnu/ld-2.23.so
  7f8094a9a000-7f8094a9b000 rw-p 00000000 00:00 0 
  7ffd82f83000-7ffd82fa4000 rw-p 00000000 00:00 0      [stack]
  7ffd82faf000-7ffd82fb1000 r--p 00000000 00:00 0      [vvar]
  7ffd82fb1000-7ffd82fb3000 r-xp 00000000 00:00 0      [vdso]
  ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0      [vsyscall]
  </code></pre>
  
  <p>Any knowledge on why this is not working? Can it be fixed or must I only choose .wav files which work?</p>