mirror of
https://github.com/F5OEO/rpitx.git
synced 2026-03-23 16:56:54 +01:00
Test fix please ignore
This commit is contained in:
@@ -103,16 +103,14 @@ static void reset(void) {
|
||||
|
||||
static PyObject*
|
||||
_rpitx_broadcast_fm(PyObject* self, PyObject* args) {
|
||||
long int address;
|
||||
float frequency;
|
||||
|
||||
assert(sizeof(address) == sizeof(sampleBase));
|
||||
if (!PyArg_ParseTuple(args, "lif", &address, &sampleLength, &frequency)) {
|
||||
assert(sizeof(sampleBase) == sizeof(unsigned long));
|
||||
if (!PyArg_ParseTuple(args, "Lif", &sampleBase, &sampleLength, &frequency)) {
|
||||
PyErr_SetString(rpitxError, "Invalid arguments");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
sampleBase = ((void*)address);
|
||||
sampleOffset = 0;
|
||||
|
||||
SF_VIRTUAL_IO virtualIo = {
|
||||
|
||||
@@ -5,6 +5,7 @@ import StringIO
|
||||
import _rpitx
|
||||
import array
|
||||
import logging
|
||||
import sys
|
||||
import wave
|
||||
|
||||
|
||||
@@ -37,7 +38,6 @@ def broadcast_fm(file_, frequency):
|
||||
wav_writer.writeframes(raw_audio_data.raw_data)
|
||||
wav_writer.close()
|
||||
|
||||
raw_array = array.array('c')
|
||||
raw_array.fromstring(wav_data.getvalue())
|
||||
raw_array = array.array('c', wav_data.getvalue())
|
||||
array_address, length = raw_array.buffer_info()
|
||||
_rpitx.broadcast_fm(long(array_address), length, frequency)
|
||||
_rpitx.broadcast_fm(array_address, length, frequency)
|
||||
|
||||
Reference in New Issue
Block a user