Changeset 573:af59e3bbe92e


Ignore:
Timestamp:
12/06/14 14:01:58 (9 years ago)
Author:
István Váradi <ivaradi@…>
Branch:
default
Phase:
public
Message:

Added function to properly deinitialize sound handling on Linux

Location:
src/mlx
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • src/mlx/mlx.py

    r535 r573  
    22from config import Config
    33from i18n import setLanguage
    4 from sound import initializeSound
     4from sound import initializeSound, finalizeSound
    55from util import secondaryInstallation
    66from const import VERSION
     
    9696
    9797        gui.run()
     98
     99        finalizeSound()
    98100    finally:
    99101        gui.flushStdIO()
  • src/mlx/sound.py

    r422 r573  
    172172                             extra = extra)
    173173
     174    def finalizeSound():
     175        """Finalize the sound handling."""
     176        pass
     177
    174178#------------------------------------------------------------------------------
    175179
     
    243247                super(SoundThread, self).__init__()
    244248
    245                 self.daemon = True
     249                self.daemon = False
    246250                self.eventLoop = SoundThread.EventLoop(soundsDirectory)
    247251
     
    269273                               extra = extra)
    270274
     275        def finalizeSound():
     276            """Finalize the sound handling."""
     277            pyglet.app.exit()
     278
    271279    except:
    272280        print "The pyglet library is missing from your system. It is needed for sound playback on Linux"
     
    281289            FIXME: it does not do anything currently, but it should."""
    282290            print "sound.startSound:", name
     291
     292        def finalizeSound():
     293            """Finalize the sound handling."""
     294            pass
    283295
    284296#------------------------------------------------------------------------------
Note: See TracChangeset for help on using the changeset viewer.