.. Automatically generated file - do not modify.

.. class:: MusicRoom(channel=u'music', fadeout=0.0, fadein=0.0, loop=True, single_track=False, shuffle=False, stop_action=None)
    
    A music room that contains a series of songs that can be unlocked
    by the user, and actions that can play entries from the list in
    order.
    
    `channel`
        The channel that this music room will operate on.
    
    `fadeout`
        The number of seconds it takes to fade out the old
        music when changing tracks.
    
    `fadein`
        The number of seconds it takes to fade in the new
        music when changing tracks.
    
    `loop`
        Determines if playback will loop or stop when it reaches
        the end of the playlist.
    
    `single_track`
        If true, only a single track will play. If loop is true,
        that track will loop. Otherwise, playback will stop when the
        track finishes.
    
    `shuffle`
        If true, the tracks are shuffled, and played in the shuffled
        order. If false, the tracks are played in the order they're
        added to the MusicRoom.
    
    `stop_action`
        An action to run when the music has stopped.
    
    Single_track and shuffle conflict with each other. Only one should
    be true at a time. (Actions that set single_track and shuffle
    enforce this.)

    .. method:: Next(self)
        
        An action that causes the music room to play the next unlocked file
        in the playlist.
    
    .. method:: Play(filename=None)
        
        This action causes the music room to start playing. If `filename` is given, that
        file begins playing. Otherwise, the currently playing file starts
        over (if it's unlocked), or the first file starts playing.
        
        If `filename` is given, buttons with this action will be insensitive
        while `filename` is locked, and will be selected when `filename`
        is playing.
    
    .. method:: Previous(self)
        
        An action that causes the music room to play the previous unlocked
        file in the playlist.
    
    .. method:: RandomPlay(self)
        
        This action causes the music room to start playing a randomly selected unlocked
        music track.
    
    .. method:: SetLoop(value)
        
        This action sets the value of the loop property.
    
    .. method:: SetShuffle(value)
        
        This action sets the value of the shuffle property.
    
    .. method:: SetSingleTrack(value)
        
        This action sets the value of the single_track property.
    
    .. method:: Stop(self)
        
        This action stops the music.
    
    .. method:: ToggleLoop(self)
        
        This action toggles the value of the loop property.
    
    .. method:: TogglePlay(self)
        
        If no music is currently playing, this action starts playing the first
        unlocked track. Otherwise, stops the currently playing music.
        
        This button is selected when any music is playing.
    
    .. method:: ToggleShuffle(self)
        
        This action toggles the value of the shuffle property.
    
    .. method:: ToggleSingleTrack(self)
        
        This action toggles the value of the single_track property.
    
    .. method:: add(filename, always_unlocked=False, action=None)
        
        Adds the music file `filename` to this music room. The music room
        will play unlocked files in the order that they are added to the
        room.
        
        `always_unlocked`
            If true, the music file will be always unlocked. This allows
            the file to show up in the music room before it has been
            played in the game.
        
        `action`
            This is a action or the list of actions. these are called when this
            file is played.
        
            For example, These actions is used to change a screen or background, description
            by the playing file.
    
    .. method:: is_unlocked(filename)
        
        Returns true if the filename has been unlocked (or is always
        unlocked), and false if it is still locked.
    
