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