Skip to content

Commit

Permalink
chore: updates to build on latest python/linux
Browse files Browse the repository at this point in the history
  • Loading branch information
ashhhleyyy committed Mar 23, 2024
1 parent 6d7c3aa commit ab2aead
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 11 deletions.
2 changes: 1 addition & 1 deletion build/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
wheel
pygame==2.0.2
pygame==2.5.2
sanic==21.9.3
sanic-Cors==2.0.1
syncer==1.3.0
Expand Down
3 changes: 1 addition & 2 deletions helpers/device_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,7 @@ def getAudioOutputs(cls) -> Tuple[List[Dict]]:
def getAudioDevices(cls) -> List[str]:
mixer.init(44100, -16, 2, 1024)
is_capture = 0 # zero to request playback devices, non-zero to request recording devices
num = sdl2.get_num_audio_devices(is_capture)
names = [str(sdl2.get_audio_device_name(i, is_capture), encoding="utf-8") for i in range(num)]
names = sdl2.audio.get_audio_device_names(is_capture)
mixer.quit()
return names

Expand Down
24 changes: 20 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
},
"scripts": {
"presenter-install": "cd presenter && git submodule update --init && yarn --network-timeout 100000",
"presenter-make": "npm run presenter-install && (rm -r presenter-build || true) && cd presenter && yarn build-baps && cp -r build ../presenter-build && cd ../ && npm install",
"presenter-make": "npm run presenter-install && (rm -r presenter-build || true) && cd presenter && NODE_OPTIONS=--openssl-legacy-provider yarn build-baps && cp -r build ../presenter-build && cd ../ && npm install",
"test": "echo \"Error: no test specified\" && exit 1",
"presenter-start": "cd presenter && yarn start-baps",
"lint": "./venv/bin/autopep8 -r -a -a --ignore E402,E226,E24,W50,W690 --max-line-length 127 --in-place --exclude=\"*node_modules*,*venv/*,presenter/*\" . && ./venv/bin/flake8 . --exclude=\"*node_modules*,*venv/*,presenter/*\" --count --ignore=E402,E226,E24,W50,W690 --max-complexity=25 --max-line-length=127 --statistics"
Expand Down
4 changes: 2 additions & 2 deletions websocket_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ async def handle_from_webstudio(self, websocket):
channel = int(data["channel"])
self.sendCommand(channel, data)

await asyncio.wait([conn.send(message) for conn in self.baps_clients])
await asyncio.wait([asyncio.Task(conn.send(message)) for conn in self.baps_clients])

except websockets.exceptions.ConnectionClosedError as e:
self.logger.log.error(
Expand Down Expand Up @@ -244,7 +244,7 @@ async def handle_to_webstudio(self):
data = json.dumps(
{"command": command, "data": message, "channel": channel}
)
await asyncio.wait([conn.send(data) for conn in self.baps_clients])
await asyncio.wait([asyncio.Task(conn.send(data)) for conn in self.baps_clients])
except queue.Empty:
continue
except ValueError:
Expand Down

0 comments on commit ab2aead

Please sign in to comment.