mixer_test.py 文件源码

python
阅读 21 收藏 0 点赞 0 评论 0

项目:Projects 作者: it2school 项目源码 文件源码
def todo_test_set_endevent(self):

        # __doc__ (as of 2008-08-02) for pygame.mixer.Channel.set_endevent:

          # Channel.set_endevent(): return None
          # Channel.set_endevent(type): return None
          # have the channel send an event when playback stops
          #
          # When an endevent is set for a channel, it will send an event to the
          # pygame queue every time a sound finishes playing on that channel
          # (not just the first time). Use pygame.event.get() to retrieve the
          # endevent once it's sent.
          #
          # Note that if you called Sound.play(n) or Channel.play(sound,n), the
          # end event is sent only once: after the sound has been played "n+1"
          # times (see the documentation of Sound.play).
          #
          # If Channel.stop() or Channel.play() is called while the sound was
          # still playing, the event will be posted immediately.
          #
          # The type argument will be the event id sent to the queue. This can
          # be any valid event type, but a good choice would be a value between
          # pygame.locals.USEREVENT and pygame.locals.NUMEVENTS. If no type
          # argument is given then the Channel will stop sending endevents.
          #

        self.fail()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号