Pygame 1.9.2

  • I have Python 3.5.1 32-bits installed on Window and Pygame 1.9.2 Python 3.5 installed as well. But in case if i forget, is there a way to check the pygame version I have installed from either command line or Python IDLE. For Python, I use python -V. But for Pygame, I don't know how to. Answer: pip show pygame // command to check your pygame details.
  • Hashes for pygame-1.9.2-cp27-cp27mu-manylinux1x8664.whl. Hashes for pygame-1.9.2-cp27-cp27mu-manylinux1x8664.whl.
  1. Pygame 1.9.2
  2. Pygame-1.9.2a0.win32-py3.4.exe
  3. Pygame 1.9.2 Game
  4. Pygame 1.9.2a0
  5. Pygame‑1.9.2a0‑cp35‑none‑win32.whl

Aug 11, 2018 amd64 build of pygame 1.9.2preubuntu-r3410726+42ubuntu16.04.1 in ubuntu xenial RELEASE PyGame development builds amd64 build of pygame 1.9.2preubunt.

Pygame 1.9.2
Pygame is a set of Python modules designed for writing games. It is written on top of the excellent SDL library.This allows you to create fully featured games and multimedia programs in the python language.Pygame is highly portable and runs on nearly every platform and operating system.In the pygame examples there is a simple example named, 'chimp'. This example simulates a punchable monkey moving around a small screen with promises of riches and reward.The example itself is very simple, and a bit thin on errorchecking code.This example program demonstrates many of pygame's abilities, like creating a graphics window, loading images and sound files, rendering TTF text, and basic event and mouse handling.What's New in This Release: [ read full changelog ]· many, many fixes and improvements. The largest amount of changes has gone into this release than any other pygame release.· bug fixes for backwards compatibility issues introduced in pygame 1.8.x series. old games like solarwolf and libraries like PGU work again.· experimental camera webcam module (still in development).· experimental midi module based on portmidi and pyportmidi (99% complete).· experimental gfxdraw module based on SDL_gfx (including AA circles, textured polygons and other goodness).· python3, and python3.1 support mostly completed. Some modules still remain to be completedbut mostly it's working.· nokia mobile phone s60 support.· improved OSX support (dropped pyobjc dependency, improved installer, sysfont now works on OSX).· pygame.examples + pygame.tests included with pygame. This makes testing easier, and also makes learning pygame more fun and easy.· cleanup of examples, and addition of new examples.· new tools to aid in development of pygame itself, better compilation documentation.· py2app, and py2exe support improved.
Ссылка: http://www.pyga..me-1.9.0release.tar.gz
Скачать pygame 1.9.0
Скачать новую версию Pygame 1.9.1

pygame.mixer.initinitialize the mixer module
pygame.mixer.pre_initpreset the mixer init arguments
pygame.mixer.quituninitialize the mixer
pygame.mixer.get_inittest if the mixer is initialized
pygame.mixer.stopstop playback of all sound channels
pygame.mixer.pausetemporarily stop playback of all sound channels
pygame.mixer.unpauseresume paused playback of sound channels
pygame.mixer.fadeoutfade out the volume on all sounds before stopping
pygame.mixer.set_num_channelsset the total number of playback channels
pygame.mixer.get_num_channelsget the total number of playback channels
pygame.mixer.set_reservedreserve channels from being automatically used
pygame.mixer.find_channelfind an unused channel
pygame.mixer.get_busytest if any sound is being mixed
pygame.mixer.SoundCreate a new Sound object from a file or buffer object
pygame.mixer.ChannelCreate a Channel object for controlling playback

This module contains classes for loading Sound objects and controllingplayback. The mixer module is optional and depends on SDL_mixer. Your programshould test that is available and intialized before usingit.

The mixer module has a limited number of channels for playback of sounds.Usually programs tell pygame to start playing audio and it selects an availablechannel automatically. The default is 8 simultaneous channels, but complexprograms can get more precise control over the number of channels and theiruse.

All sound playback is mixed in background threads. When you begin to play aSound object, it will return immediately while the sound continues to play. Asingle Sound object can also be actively played back multiple times.

The mixer also has a special streaming channel. This is for music playback andis accessed through the module.

The mixer module must be initialized like other pygame modules, but it has someextra conditions. The pygame.mixer.init() function takes several optionalarguments to control the playback rate and sample size. Pygame will default toreasonable values, but pygame cannot perform Sound resampling, so the mixershould be initialized to match the values of your audio resources.

NOTE: Not to get less laggy sound, use a smaller buffer size. The defaultis set to reduce the chance of scratchy sounds on some computers. You canchange the default buffer by calling before or is called. For example:pygame.mixer.pre_init(44100,-16,2,1024) The default size was changed from1024 to 3072 in pygame 1.8.

pygame.mixer.init()
init(frequency=22050, size=-16, channels=2, buffer=4096) -> None
Pygame 1.9.2

Initialize the mixer module for Sound loading and playback. The defaultarguments can be overridden to provide specific audio mixing. Keywordarguments are accepted. For backward compatibility where an argument is setzero the default value is used (possible changed by a pre_init call).

The size argument represents how many bits are used for each audio sample.If the value is negative then signed sample values will be used. Positivevalues mean unsigned audio samples will be used. An invalid value raises anexception.

The channels argument is used to specify whether to use mono or stereo. 1for mono and 2 for stereo. No other values are supported (negative valuesare treated as 1, values greater than 2 as 2).

The buffer argument controls the number of internal samples used in thesound mixer. The default value should work for most cases. It can be loweredto reduce latency, but sound dropout may occur. It can be raised to largervalues to ensure playback never skips, but it will impose latency on soundplayback. The buffer size must be a power of two (if not it is rounded up tothe next nearest power of 2).

Some platforms require the module to be initializedafter the display modules have initialized. The top level pygame.init()takes care of this automatically, but cannot pass any arguments to the mixerinit. To solve this, mixer has a function pygame.mixer.pre_init() to setthe proper defaults before the toplevel init is used.

It is safe to call this more than once, but after the mixer is initializedyou cannot change the playback arguments without first callingpygame.mixer.quit().

pygame.mixer.pre_init()
pre_init(frequency=22050, size=-16, channels=2, buffersize=4096) -> None

Call pre_init to change the defaults used when the realpygame.mixer.init() is called. Keyword arguments are accepted. The bestway to set custom mixer playback values is to callpygame.mixer.pre_init() before calling the top level pygame.init().For backward compatibility argument values of zero is replaced with thestartup defaults.

pygame.mixer.quit()
quit() -> None

This will uninitialize . All playback will stop and anyloaded Sound objects may not be compatible with the mixer if it isreinitialized later.

pygame.mixer.get_init()
get_init() -> (frequency, format, channels)

If the mixer is initialized, this returns the playback arguments it isusing. If the mixer has not been initialized this returns None

pygame.mixer.stop()
Pygame 1.9.2a0
stop() -> None

This will stop all playback of all active mixer channels.

pygame.mixer.pause()
pause() -> None

This will temporarily stop all playback on the active mixer channels. Theplayback can later be resumed with pygame.mixer.unpause()

pygame.mixer.unpause()
unpause() -> None

This will resume all active sound channels after they have been paused.

pygame.mixer.fadeout()
fadeout(time) -> None

This will fade out the volume on all active channels over the time argumentin milliseconds. After the sound is muted the playback will stop.

pygame.mixer.set_num_channels()
set_num_channels(count) -> None

Sets the number of available channels for the mixer. The default value is 8.The value can be increased or decreased. If the value is decreased, soundsplaying on the truncated channels are stopped.

pygame.mixer.get_num_channels()
get_num_channels() -> count

Returns the number of currently active playback channels.

pygame.mixer.set_reserved()
set_reserved(count) -> None

The mixer can reserve any number of channels that will not be automaticallyselected for playback by Sounds. If sounds are currently playing on thereserved channels they will not be stopped.

This allows the application to reserve a specific number of channels forimportant sounds that must not be dropped or have a guaranteed channel toplay on.

pygame.mixer.find_channel()
find_channel(force=False) -> Channel

This will find and return an inactive Channel object. If there are noinactive Channels this function will return None. If there are no inactivechannels and the force argument is True, this will find the Channel with thelongest running Sound and return it.

If the mixer has reserved channels from pygame.mixer.set_reserved() thenthose channels will not be returned here.

pygame.mixer.get_busy()
get_busy() -> bool

Returns True if the mixer is busy mixing any channels. If the mixer is idlethen this return False.

class pygame.mixer.Sound
Create a new Sound object from a file or buffer object
Sound(file=filename) -> Sound
Sound(buffer=buffer) -> Sound
Sound(file=object) -> Sound
pygame.mixer.Sound.playbegin sound playback
pygame.mixer.Sound.stopstop sound playback
pygame.mixer.Sound.fadeoutstop sound playback after fading out
pygame.mixer.Sound.set_volumeset the playback volume for this Sound
pygame.mixer.Sound.get_volumeget the playback volume
pygame.mixer.Sound.get_num_channelscount how many times this Sound is playing
pygame.mixer.Sound.get_lengthget the length of the Sound
pygame.mixer.Sound.get_bufferacquires a buffer object for the samples of the Sound.

Load a new sound buffer from a filename, a python file object or a readablebuffer object. Limited resampling will be performed to help the sample matchthe initialize arguments for the mixer. A Unicode string can only be a filepathname. A Python 2.x string or a Python 3.x bytes object can be either apathname or a buffer object. Use the ‘file’ or ‘buffer’ keywords to avoidambiguity; otherwise Sound may guess wrong. If the array keyword is used,the object is expected to export a version 3, C level array interfaceor, for Python 2.6 or later, a new buffer interface (The object is checkedfor a buffer interface first.)

Pygame 1.9.2

The Sound object represents actual sound sample data. Methods that changethe state of the Sound object will the all instances of the Sound playback.A Sound object also exports an array interface, and, for Python 2.6 orlater, a new buffer interface.

The Sound can be loaded from an OGG audio file or from an uncompressedWAV.

Note: The buffer will be copied internally, no data will be shared betweenit and the Sound object.

For now buffer and array support is consistent with sndarray.make_soundfor Numeric arrays, in that sample sign and byte order are ignored. Thiswill change, either by correctly handling sign and byte order, or by raisingan exception when different. Also, source samples are truncated to fit theaudio sample size. This will not change.

pygame.mixer.Sound(buffer) is new in pygame 1.8 keyword arguments and array interface supportnew in pygame 1.9.2

play()
play(loops=0, maxtime=0, fade_ms=0) -> Channel

Begin playback of the Sound (i.e., on the computer’s speakers) on anavailable Channel. This will forcibly select a Channel, so playback maycut off a currently playing sound if necessary.

The loops argument controls how many times the sample will be repeatedafter being played the first time. A value of 5 means that the sound willbe played once, then repeated five times, and so is played a total of sixtimes. The default value (zero) means the Sound is not repeated, and sois only played once. If loops is set to -1 the Sound will loopindefinitely (though you can still call stop() to stop it).

The maxtime argument can be used to stop playback after a given number ofmilliseconds.

The fade_ms argument will make the sound start playing at 0 volume andfade up to full volume over the time given. The sample may end before thefade-in is complete.

This returns the Channel object for the channel that was selected.

stop()
stop() -> None

This will stop the playback of this Sound on any active Channels.

fadeout()
fadeout(time) -> None

This will stop playback of the sound after fading it out over the timeargument in milliseconds. The Sound will fade and stop on all activelyplaying channels.

set_volume()
set_volume(value) -> None

This will set the playback volume (loudness) for this Sound. This willimmediately affect the Sound if it is playing. It will also affect anyfuture playback of this Sound. The argument is a value from 0.0 to 1.0.

get_volume()
get_volume() -> value

Return a value from 0.0 to 1.0 representing the volume for this Sound.

get_num_channels()
get_num_channels() -> count

Return the number of active channels this sound is playing on.

get_length()
get_length() -> seconds

Return the length of this Sound in seconds.

get_buffer()
acquires a buffer object for the samples of the Sound.

Return a buffer object for the Sound samples. The buffer can be used fordirect access and manipulation.

New in pygame 1.8.

class pygame.mixer.Channel
Channel(id) -> Channel
pygame.mixer.Channel.playplay a Sound on a specific Channel
pygame.mixer.Channel.stopstop playback on a Channel
pygame.mixer.Channel.pausetemporarily stop playback of a channel
pygame.mixer.Channel.unpauseresume pause playback of a channel
pygame.mixer.Channel.fadeoutstop playback after fading channel out
pygame.mixer.Channel.set_volumeset the volume of a playing channel
pygame.mixer.Channel.get_volumeget the volume of the playing channel
pygame.mixer.Channel.get_busycheck if the channel is active
pygame.mixer.Channel.get_soundget the currently playing Sound
pygame.mixer.Channel.queuequeue a Sound object to follow the current
pygame.mixer.Channel.get_queuereturn any Sound that is queued
pygame.mixer.Channel.set_endeventhave the channel send an event when playback stops
pygame.mixer.Channel.get_endeventget the event a channel sends when playback stops

Return a Channel object for one of the current channels. The id must be avalue from 0 to the value of pygame.mixer.get_num_channels().

The Channel object can be used to get fine control over the playback ofSounds. A channel can only playback a single Sound at time. Using channelsis entirely optional since pygame can manage them by default.

play()
play(Sound, loops=0, maxtime=0, fade_ms=0) -> None

This will begin playback of a Sound on a specific Channel. If the Channelis currently playing any other Sound it will be stopped.

The loops argument has the same meaning as in Sound.play(): it is thenumber of times to repeat the sound after the first time. If it is 3, thesound will be played 4 times (the first time, then three more). If loopsis -1 then the playback will repeat indefinitely.

As in Sound.play(), the maxtime argument can be used to stop playbackof the Sound after a given number of milliseconds.

As in Sound.play(), the fade_ms argument can be used fade in thesound.

stop()
stop() -> None

Stop sound playback on a channel. After playback is stopped the channelbecomes available for new Sounds to play on it.

pause()
pause() -> None

Temporarily stop the playback of sound on a channel. It can be resumed ata later time with Channel.unpause()

unpause()
unpause() -> None

Resume the playback on a paused channel.

fadeout()
fadeout(time) -> None

Stop playback of a channel after fading out the sound over the given timeargument in milliseconds.

set_volume()
set_volume(value) -> None

Set the volume (loudness) of a playing sound. When a channel starts toplay its volume value is reset. This only affects the current sound. Thevalue argument is between 0.0 and 1.0.

If one argument is passed, it will be the volume of both speakers. If twoarguments are passed and the mixer is in stereo mode, the first argumentwill be the volume of the left speaker and the second will be the volumeof the right speaker. (If the second argument is None, the first argumentwill be the volume of both speakers.)

If the channel is playing a Sound on which set_volume() has also beencalled, both calls are taken into account. For example:

get_volume()
get_volume() -> value

Return the volume of the channel for the current playing sound. This doesnot take into account stereo separation used byChannel.set_volume(). The Sound object also has its own volumewhich is mixed with the channel.

Pygame 1.9.2

get_busy()
get_busy() -> bool

Returns true if the channel is activily mixing sound. If the channel isidle this returns False.

get_sound()

Pygame-1.9.2a0.win32-py3.4.exe

get_sound() -> Sound

Return the actual Sound object currently playing on this channel. If thechannel is idle None is returned.

queue()
queue(Sound) -> None

When a Sound is queued on a Channel, it will begin playing immediatelyafter the current Sound is finished. Each channel can only have a singleSound queued at a time. The queued Sound will only play if the currentplayback finished automatically. It is cleared on any other call toChannel.stop() or Channel.play().

If there is no sound actively playing on the Channel then the Sound willbegin playing immediately.

Pygame 1.9.2
get_queue()
get_queue() -> Sound

If a Sound is already queued on this channel it will be returned. Oncethe queued sound begins playback it will no longer be on the queue.

set_endevent()

Pygame 1.9.2 Game

have the channel send an event when playback stops
set_endevent(type) -> None

When an endevent is set for a channel, it will send an event to thepygame queue every time a sound finishes playing on that channel (notjust the first time). Use pygame.event.get() to retrieve the endeventonce 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 wasstill playing, the event will be posted immediately.

The type argument will be the event id sent to the queue. This can be anyvalid event type, but a good choice would be a value betweenpygame.locals.USEREVENT and pygame.locals.NUMEVENTS. If no typeargument is given then the Channel will stop sending endevents.

Pygame 1.9.2a0

get_endevent()
get_endevent() -> type

Pygame‑1.9.2a0‑cp35‑none‑win32.whl

Returns the event type to be sent every time the Channel finishesplayback of a Sound. If there is no endevent the function returnspygame.NOEVENT.