mirror of
https://github.com/F5OEO/rpitx.git
synced 2026-03-23 16:56:54 +01:00
Use long for address base
This commit is contained in:
@@ -103,16 +103,16 @@ static void reset(void) {
|
||||
|
||||
static PyObject*
|
||||
_rpitx_broadcast_fm(PyObject* self, PyObject* args) {
|
||||
int address;
|
||||
int length;
|
||||
long int address;
|
||||
float frequency;
|
||||
if (!PyArg_ParseTuple(args, "iif", &address, &length, &frequency)) {
|
||||
|
||||
assert(sizeof(address) == sizeof(sampleBase));
|
||||
if (!PyArg_ParseTuple(args, "lif", &address, &sampleLength, &frequency)) {
|
||||
PyErr_SetString(rpitxError, "Invalid arguments");
|
||||
Py_RETURN_NONE;
|
||||
}
|
||||
|
||||
sampleBase = (void*)address;
|
||||
sampleLength = length;
|
||||
sampleBase = ((void*)address);
|
||||
sampleOffset = 0;
|
||||
|
||||
SF_VIRTUAL_IO virtualIo = {
|
||||
|
||||
@@ -40,4 +40,4 @@ def broadcast_fm(file_, frequency):
|
||||
raw_array = array.array('c')
|
||||
raw_array.fromstring(wav_data.getvalue())
|
||||
array_address, length = raw_array.buffer_info()
|
||||
_rpitx.broadcast_fm(array_address, length, frequency)
|
||||
_rpitx.broadcast_fm(long(array_address), length, frequency)
|
||||
|
||||
Reference in New Issue
Block a user