Learn Before
Concept

Sounds in Pygame

Sounds can be stored and played using the mixer module. The module is initialized by default, thuogh you can reinitialize it to change certain settings. A Sound object, when played, will immediately return while the sound continues to play on a certain channel. The channels are usually selected automatically, and the default is 8 simultaneous channels. However, more intensive programs may modify/control how many channels are available. There is also a submodule called music which is used for music playback and provides a special channel for it.

0

1

Updated 2021-08-02

Tags

Python Programming Language

Data Science

Related