Пример #1
0
def adpcm2lin(cp, size, state):
    _check_size(size)
    state = _check_state(state)
    rv = ffi.new("unsigned char[]", len(cp) * size * 2)
    state_ptr = ffi.new("int[]", state)
    lib.adcpm2lin(rv, cp, len(cp), size, state_ptr)
    return ffi.buffer(rv)[:], tuple(state_ptr)
Пример #2
0
def adpcm2lin(cp, size, state):
    _check_size(size)
    state = _check_state(state)
    rv = ffi.new("unsigned char[]", len(cp) * size * 2)
    state_ptr = ffi.new("int[]", state)
    lib.adcpm2lin(rv, cp, len(cp), size, state_ptr)
    return ffi.buffer(rv)[:], tuple(state_ptr)