Skip to content

Commit 94620c9

Browse files
committed
Merge remote-tracking branch 'origin/devel'
2 parents 4d59b51 + f6b2d9d commit 94620c9

File tree

3 files changed

+25
-21
lines changed

3 files changed

+25
-21
lines changed

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
redis
33
pyyaml
44
numpy
5-
wave
5+
# wave
66
qrcode[pil]
77
opencv-python
88
python-dotenv

stream_simulator/controllers/env_devices/controller_microphone.py

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
import logging
1010
from pathlib import Path
1111
import base64
12-
import wave
12+
# import wave
1313

1414
from stream_simulator.base_classes import BaseThing
1515

@@ -343,13 +343,15 @@ def load_wav(self, path):
343343
dirname = Path(__file__).resolve().parent
344344
fil = str(dirname) + '/../../resources/' + path
345345
self.logger.info("Reading sound from %s", fil)
346-
f = wave.open(fil, 'rb')
347-
data = bytearray()
348-
sample = f.readframes(256)
349-
while sample:
350-
for s in sample:
351-
data.append(s)
352-
sample = f.readframes(256)
353-
f.close()
354-
source = base64.b64encode(data).decode("ascii")
346+
# NOTE: Wave is broken
347+
# f = wave.open(fil, 'rb')
348+
# data = bytearray()
349+
# sample = f.readframes(256)
350+
# while sample:
351+
# for s in sample:
352+
# data.append(s)
353+
# sample = f.readframes(256)
354+
# f.close()
355+
# source = base64.b64encode(data).decode("ascii")
356+
source = ""
355357
return source

stream_simulator/controllers/sensors/controller_microphone.py

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
import time
99
import logging
1010
import base64
11-
import wave
11+
# import wave
1212
from pathlib import Path
1313

1414
from stream_simulator.base_classes import BaseThing
@@ -216,15 +216,17 @@ def load_wav(self, path):
216216
dirname = Path(__file__).resolve().parent
217217
fil = str(dirname) + '/../../resources/' + path
218218
self.logger.info("Reading sound from %s", fil)
219-
f = wave.open(fil, 'rb')
220-
data = bytearray()
221-
sample = f.readframes(256)
222-
while sample:
223-
for s in sample:
224-
data.append(s)
225-
sample = f.readframes(256)
226-
f.close()
227-
source = base64.b64encode(data).decode("ascii")
219+
# NOTE: Wave is broken
220+
# f = wave.open(fil, 'rb')
221+
# data = bytearray()
222+
# sample = f.readframes(256)
223+
# while sample:
224+
# for s in sample:
225+
# data.append(s)
226+
# sample = f.readframes(256)
227+
# f.close()
228+
# source = base64.b64encode(data).decode("ascii")
229+
source = ""
228230
return source
229231

230232
def on_goal(self, goalh):

0 commit comments

Comments
 (0)