mirror of
https://github.com/ggerganov/ggwave.git
synced 2026-02-07 09:18:01 +08:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user