
    &h                     P    S r SSKJr  SSKrSSKr/ SQrS rS rS rS r	S	 r
S
 rg)a  pygame module for accessing sound sample data

Functions to convert between NumPy arrays and Sound objects. This module
will only be functional when pygame can use the external NumPy package.
If NumPy can't be imported, surfarray becomes a MissingModule object.

Sound data is made of thousands of samples per second, and each sample
is the amplitude of the wave at a particular moment in time. For
example, in 22-kHz format, element number 5 of the array is the
amplitude of the wave after 5/22000 seconds.

Each sample is an 8-bit or 16-bit integer, depending on the data format.
A stereo sound file has two values per sample, while a mono sound file
only has one.

Sounds with 16-bit data will be treated as unsigned integers,
if the sound sample type requests this.
    )mixerN)arraysamples
make_sounduse_arraytypeget_arraytypeget_arraytypesc                 ,    [         R                  " U SS9$ )zpygame.sndarray.array(Sound): return array

Copy Sound samples into an array.

Creates a new array for the sound data and copies the samples. The
array will always be in the format returned from
pygame.mixer.get_init().
Tcopynumpyr   sounds    G/var/www/auris/envauris/lib/python3.13/site-packages/pygame/sndarray.pyr   r   8   s     ;;u4((    c                 ,    [         R                  " U SS9$ )a  pygame.sndarray.samples(Sound): return array

Reference Sound samples into an array.

Creates a new array that directly references the samples in a Sound
object. Modifying the array will change the Sound. The array will
always be in the format returned from pygame.mixer.get_init().
Fr   r   r   s    r   r   r   E   s     ;;u5))r   c                 *    [         R                  " U S9$ )zpygame.sndarray.make_sound(array): return Sound

Convert an array into a Sound object.

Create a new playable Sound object from an array. The mixer module
must be initialized and the array format must be similar to the mixer
audio format.
r   )r   Soundr   s    r   r   r   R   s     ;;U##r   c                     [         R                  " [        S5      5        U R                  5       n U S:w  a  [	        S5      eg)zipygame.sndarray.use_arraytype(arraytype): return None

DEPRECATED - only numpy arrays are now supported.
donly numpy arrays are now supported, this function will be removed in a future version of the moduler   zinvalid array typeN)warningswarnDeprecationWarninglower
ValueError)	arraytypes    r   r   r   _   sD    
 MM+	
 !IG-.. r   c                  B    [         R                  " [        S5      5        g)z_pygame.sndarray.get_arraytype(): return str

DEPRECATED - only numpy arrays are now supported.
r   r   r   r   r    r   r   r   r   p   s"    
 MM+	
 r   c                  B    [         R                  " [        S5      5        g)zbpygame.sndarray.get_arraytypes(): return tuple

DEPRECATED - only numpy arrays are now supported.
r   )r   r    r!   r   r   r	   r	      s"    
 MM+	
 r   )__doc__pygamer   r   r   __all__r   r   r   r   r   r	   r!   r   r   <module>r&      s:   *&   
)
*
$/"r   