chore: updates to build on latest python/linux

This commit is contained in:
Ashhhleyyy 2024-03-23 11:11:30 +00:00
parent 6d7c3aab2f
commit ab2aead17e
Signed by: ash
GPG key ID: 83B789081A0878FB
6 changed files with 26 additions and 11 deletions

View file

@ -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

View file

@ -64,8 +64,7 @@ class DeviceManager:
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

22
package-lock.json generated
View file

@ -1,13 +1,29 @@
{
"name": "bapsicle",
"version": "3.1.0",
"lockfileVersion": 1,
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "bapsicle",
"version": "3.1.0",
"license": "ISC",
"dependencies": {
"yarn": {
"yarn": "^1.22.15"
}
},
"node_modules/yarn": {
"version": "1.22.15",
"resolved": "https://registry.npmjs.org/yarn/-/yarn-1.22.15.tgz",
"integrity": "sha512-AzoEDxj256BOS/jqDXA3pjyhmi4FRBBUMgYoTHI4EIt2EhREkvH0soPVEtnD+DQIJfU5R9bKhcZ1H9l8zPWeoA=="
"integrity": "sha512-AzoEDxj256BOS/jqDXA3pjyhmi4FRBBUMgYoTHI4EIt2EhREkvH0soPVEtnD+DQIJfU5R9bKhcZ1H9l8zPWeoA==",
"hasInstallScript": true,
"bin": {
"yarn": "bin/yarn.js",
"yarnpkg": "bin/yarn.js"
},
"engines": {
"node": ">=4.0.0"
}
}
}
}

View file

@ -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"

@ -1 +1 @@
Subproject commit 238da52d94f9a2e1f476e5c8e155e50dd8519cb7
Subproject commit 537e61733233b9d4e43865e5ca5ca9bd348a07ef

View file

@ -92,7 +92,7 @@ class WebsocketServer:
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(
@ -244,7 +244,7 @@ class WebsocketServer:
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: