def array(sound): """pygame.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(). """ return numpysnd.array(sound)
def array (sound): """pygame.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(). """ if __arraytype == "numeric": return numericsnd.array (sound) elif __arraytype == "numpy": return numpysnd.array (sound) raise NotImplementedError("sound arrays are not supported")
def array(sound): """pygame.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(). """ global numpysnd try: return numpysnd.array(sound) except AttributeError: import pygame._numpysndarray as numpysnd return numpysnd.array(sound)