<div class="gmail_quote">On Thu, Dec 10, 2009 at 8:40 AM, Dave Angel <span dir="ltr"><<a href="mailto:davea@ieee.org">davea@ieee.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div id=":148" class="ii gt">If I may make a guess (I've never used pygame), I'd suggest that the sound playing logic counts on using the event loop for its timing. So without an event loop, no sound.<br></div></blockquote>
</div><div><br></div>Also, livewires is a pretty ancient - AFAICT they haven't had a new release in over a year. Pygame is a little more active in its development and is really easy enough with so much documentation there's no reason to learn livewires.<div>
<br></div><div>Here's a simple example of playing a midi file with pygame only:</div><div><br></div><div><div>import pygame</div><div><br></div><div>pygame.init()</div><div>pygame.mixer.music.load('ISawHerStandingThere.mid')</div>
<div>pygame.mixer.music.set_endevent(pygame.QUIT)</div><div>pygame.mixer.music.play()</div><div><br></div><div>while True:</div><div> event = pygame.event.poll()</div><div> if event.type == pygame.QUIT:</div><div> print 'Quitting'</div>
<div> break</div><div><br></div></div><div><br></div><div>Of course, replace "ISawHerStandingThere.mid" with whatever music file you want to play... </div><div><br></div><div>HTH,</div><div>Wayne<br><br clear="all">
<br>-- <br>To be considered stupid and to be told so is more painful than being called gluttonous, mendacious, violent, lascivious, lazy, cowardly: every weakness, every vice, has found its defenders, its rhetoric, its ennoblement and exaltation, but stupidity hasn’t. - Primo Levi<br>
</div>