Merge pull request #32 from UniversityRadioYork/mstratford/soundcard-fixes

3.0.1 Minor Patch for Audio Reliability
This commit is contained in:
Matthew Stratford 2021-10-01 00:41:48 +01:00 committed by GitHub
commit 9e2eefa6fc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 20 additions and 10 deletions

View file

@ -1,7 +1,7 @@
autopep8
pygame==2.0.1
sanic
sanic-cors
sanic==21.3.4
sanic-Cors==1.0.0
syncer
aiohttp
mutagen

2
package-lock.json generated
View file

@ -1,5 +1,5 @@
{
"name": "bapsicle",
"version": "3.0.0",
"version": "3.0.1",
"lockfileVersion": 1
}

View file

@ -1,7 +1,7 @@
{
"name": "bapsicle",
"nice_name": "BAPSicle",
"version": "3.0.0",
"version": "3.0.1",
"description": "BAPS3, the third generation of University Radio York's Broadcast and Presenting Suite. This package includes the Server (BAPSicle) and Presenter (WebStudio)",
"main": "index.js",
"directories": {

View file

@ -394,9 +394,13 @@ class Player:
def load(self, weight: int):
if not self.isPlaying:
loaded_state = self.state.get()
self.unload()
showplan = self.state.get()["show_plan"]
self.logger.log.info("Resetting output (in case of sound output gone silent somehow) to " + str(loaded_state["output"]))
self.output(loaded_state["output"])
showplan = loaded_state["show_plan"]
loaded_item: Optional[PlanItem] = None

View file

@ -319,9 +319,15 @@ async def audio_file(request, type: str, id: int):
# Static Files
app.static("/favicon.ico", resolve_local_file_path("ui-static/favicon.ico"), name="ui-favicon")
app.static("/static", resolve_local_file_path("ui-static"), name="ui-static")
app.static("/presenter/", resolve_local_file_path("presenter-build/index.html"),
strict_slashes=True, name="presenter-index")
app.static("/presenter/", resolve_local_file_path("presenter-build"))
dist_directory = resolve_local_file_path("presenter-build")
app.static("/presenter", dist_directory)
app.static(
"/presenter/",
resolve_local_file_path("presenter-build/index.html"),
strict_slashes=True,
name="presenter-index",
)
# Helper Functions

View file

@ -7,7 +7,7 @@ from typing import List
import websockets
import json
from os import _exit
from websockets.server import Serve
from websockets.server import serve
from setproctitle import setproctitle
from multiprocessing import current_process
@ -25,7 +25,7 @@ class WebsocketServer:
logger: LoggingManager
to_webstudio: Task
from_webstudio: Task
websocket_server: Serve
websocket_server: serve
def __init__(self, in_q, out_q, state):