Skip to content

Commit

Permalink
Merge pull request #32 from UniversityRadioYork/mstratford/soundcard-…
Browse files Browse the repository at this point in the history
…fixes

3.0.1 Minor Patch for Audio Reliability
  • Loading branch information
mstratford authored Sep 30, 2021
2 parents 7d2757a + 6e921f6 commit 9e2eefa
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 10 deletions.
4 changes: 2 additions & 2 deletions build/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
autopep8
pygame==2.0.1
sanic
sanic-cors
sanic==21.3.4
sanic-Cors==1.0.0
syncer
aiohttp
mutagen
Expand Down
2 changes: 1 addition & 1 deletion 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
@@ -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": {
Expand Down
6 changes: 5 additions & 1 deletion player.py
Original file line number Diff line number Diff line change
Expand Up @@ -394,9 +394,13 @@ def clear_channel_plan(self) -> bool:

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

Expand Down
12 changes: 9 additions & 3 deletions web_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions websocket_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
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

Expand All @@ -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):

Expand Down

0 comments on commit 9e2eefa

Please sign in to comment.