update default parameters + python updates

- by default ggwave will now output 32-bit float samples
- python samples no longer use numpy
- python test now decodes payload
- fix buffer overflow in receive.py example
This commit is contained in:
Georgi Gerganov
2021-01-23 23:30:24 +02:00
parent ba8e0cd2b1
commit 105e0fd48d
7 changed files with 19 additions and 14 deletions

View File

@@ -3,7 +3,6 @@ cimport cython
from cpython.mem cimport PyMem_Malloc, PyMem_Free
import re
import struct
cimport cggwave
@@ -43,7 +42,7 @@ def encode(payload, txProtocolId = 1, volume = 10, instance = None):
if (own):
free(instance)
return struct.unpack("h"*n, output_bytes[0:2*n])
return output_bytes
def decode(instance, waveform):
""" Analyze and decode audio waveform to obtain original payload