Mercurial > pygame
diff docs/ref/sndarray.html @ 627:18b5fa9180bf
new reference documentation system
| author | pygame |
|---|---|
| date | Mon, 03 Oct 2005 06:52:07 +0000 |
| parents | |
| children | 85f2ac863647 |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/docs/ref/sndarray.html Mon Oct 03 06:52:07 2005 +0000 @@ -0,0 +1,90 @@ + +<html> +<title>sndarray - Pygame Documentation</title> +<body bgcolor=#aaeebb text=#000000 link=#331111 vlink=#331111> + + +<table cellspacing=3 width=100%><tr><td bgcolor=#00000> +<table width=100%><tr><td bgcolor=c2fc20 align=center> + <a href=http://www.pygame.org> + <img src=../pygame_tiny.gif border=0 width=200 height=60></a><br> + <b>pygame documentation</b> +</td><td bgcolor=6aee28 align=center valign=top width=100%> + + || + <a href=http://www.pygame.org>Pygame Home</a> || + <a href=../index.html>Help Contents</a> || + <a href=index.html>Reference Index</a> || + <br> <br> + +<a href=cdrom.html>Cdrom</a> || +<a href=cursors.html>Cursors</a> || +<a href=display.html>Display</a> || +<a href=draw.html>Draw</a> || +<a href=event.html>Event</a> || +<a href=font.html>Font</a> || +<a href=image.html>Image</a> || +<a href=joystick.html>Joystick</a> || +<a href=key.html>Key</a> || +<a href=mixer.html>Mixer</a> || +<a href=mouse.html>Mouse</a> || +<a href=movie.html>Movie</a> || +<a href=music.html>Music</a> || +<a href=overlay.html>Overlay</a> || +<a href=pygame.html>Pygame</a> || +<a href=rect.html>Rect</a> || +<a href=sndarray.html>Sndarray</a> || +<a href=sprite.html>Sprite</a> || +<a href=surface.html>Surface</a> || +<a href=surfarray.html>Surfarray</a> || +<a href=time.html>Time</a> || +<a href=transform.html>Transform</a> +</p> + + +</td></tr></table></td></tr></table> +<br> + + +<a name="pygame.sndarray"> +<big><b>pygame.sndarray</big></b><br><ul> + <i>pygame module for accessing sound sample data</i><br> +<ul><small><table> + <tr><td><a href="sndarray.html#pygame.sndarray.array">pygame.sndarray.array</a></td><td>copy Sound samples into an array</td></tr> + <tr><td><a href="sndarray.html#pygame.sndarray.samples">pygame.sndarray.samples</a></td><td>reference Sound samples into an array</td></tr> + <tr><td><a href="sndarray.html#pygame.sndarray.make_sound">pygame.sndarray.make_sound</a></td><td>convert an array into a Sound object</td></tr> +</table></small></ul> +<p>Functions to convert between Numeric arrays and Sound objects. This module will only be available when pygame can use the external Numeric package. </p> +<p>Sound data is made of thousands of sample per second. Each sample is an 8bit or 16bit integer, depending on the data format. <tt>A</tt> stereo sound file has two values per sample, while mono sound only has one. </p> +<p>Numeric does not use unsigned 16bit integers, they will be converted to signed 16bit arrays. </p> + <br> + + +<a name="pygame.sndarray.array"> +<big><b>pygame.sndarray.array</big></b><br><ul> + <i>copy Sound samples into an array</i><br> + <tt>pygame.sndarray.array(Sound): return array</tt><br> +<p>Creates a new Numeric array for the sound data and copies the samples. The array will always be in the format returned from <tt><a href="mixer.html#pygame.mixer.get_init">pygame.mixer.get_init</a></tt>. </p> + <br> +<br></ul> + + +<a name="pygame.sndarray.samples"> +<big><b>pygame.sndarray.samples</big></b><br><ul> + <i>reference Sound samples into an array</i><br> + <tt>pygame.sndarray.samples(Sound): return array</tt><br> +<p>Creates a new Numeric array that direcetly references the samples in a Sound object. Modifying the array will change the Sound. The array will always be in the format returned from <tt><a href="mixer.html#pygame.mixer.get_init">pygame.mixer.get_init</a></tt>. </p> + <br> +<br></ul> + + +<a name="pygame.sndarray.make_sound"> +<big><b>pygame.sndarray.make_sound</big></b><br><ul> + <i>convert an array into a Sound object</i><br> + <tt>pygame.sndarray.make_sound(array): return Sound</tt><br> +<p>Create a new playable Sound object from a Numeric array. The mixer module must be initialized and the array format must be similar to the mixer audio format. </p> + <br> +<br></ul> +<br></ul> + +</body></html>
