Popular recipes tagged "meta:requires=pygame", "multimedia" and "pygame"http://code.activestate.com/recipes/tags/meta:requires=pygame+multimedia+pygame/2007-06-21T14:16:58-07:00ActiveState Code RecipesPlay sound files with pygame in a cross-platform manner (Python)
2007-06-21T14:16:58-07:00Chris Arndthttp://code.activestate.com/recipes/users/1499228/http://code.activestate.com/recipes/521884-play-sound-files-with-pygame-in-a-cross-platform-m/
<p style="color: grey">
Python
recipe 521884
by <a href="/recipes/users/1499228/">Chris Arndt</a>
(<a href="/recipes/tags/multimedia/">multimedia</a>, <a href="/recipes/tags/pygame/">pygame</a>, <a href="/recipes/tags/sound/">sound</a>, <a href="/recipes/tags/sysadmin/">sysadmin</a>).
Revision 4.
</p>
<p>This simple script shows how to play back a sound file using the mixer module from the pygame library. If you have pygame installed, this will work on all major platforms. The mixer module supports WAV and OGG files with many different sample rates, bits per sample and channels. The script will play back all supported files given on the command line sequentially.</p>