コード例 #1
0
def samples(sound):
    """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().
    """
    global numpysnd
    try:
        return numpysnd.samples(sound)
    except AttributeError:
        import pygame._numpysndarray as numpysnd
        return numpysnd.samples(sound)
コード例 #2
0
ファイル: sndarray.py プロジェクト: leyuxuan1230/python
def samples(sound):
    """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().
    """
    return numpysnd.samples(sound)
コード例 #3
0
def samples (sound):
    """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().
    """
    if __arraytype == "numeric":
        return numericsnd.samples (sound)
    elif __arraytype == "numpy":
        return numpysnd.samples (sound)
    raise NotImplementedError("sound arrays are not supported")
コード例 #4
0
ファイル: sndarray.py プロジェクト: ewelinka/XO2XO.activity
def samples (sound):
    """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().
    """
    if __arraytype == "numeric":
        return numericsnd.samples (sound)
    elif __arraytype == "numpy":
        return numpysnd.samples (sound)
    raise NotImplementedError("sound arrays are not supported")