Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: whitequark/glasgow
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 3fc080967652
Choose a base ref
...
head repository: whitequark/glasgow
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 13d9864a2702
Choose a head ref
  • 1 commit
  • 1 file changed
  • 1 contributor

Commits on Feb 26, 2019

  1. Copy the full SHA
    13d9864 View commit details
Showing with 3 additions and 5 deletions.
  1. +3 −5 software/glasgow/applet/yamaha_opl/__init__.py
8 changes: 3 additions & 5 deletions software/glasgow/applet/yamaha_opl/__init__.py
Original file line number Diff line number Diff line change
@@ -578,16 +578,14 @@ async def serve_vgm(self, request):
response = web.StreamResponse()
response.content_type = "text/plain"
response.headers["X-Sample-Rate"] = str(output_rate)
total_samples = int(vgm_reader.total_samples * (output_rate / 44100))
total_samples = int(vgm_reader.total_seconds * output_rate)
response.headers["X-Total-Samples"] = str(total_samples)
if vgm_reader.loop_samples in (0, vgm_reader.total_samples):
# Either 0 or the entire VGM here means we'll loop the complete track.
loop_skip_to = 0
else:
loop_skip_to = int(
(vgm_reader.total_samples - vgm_reader.loop_samples) *
(output_rate / 44100)
)
loop_skip_to = int((vgm_reader.total_seconds - vgm_reader.loop_seconds)
* output_rate)
response.headers["X-Loop-Skip-To"] = str(loop_skip_to)
response.enable_chunked_encoding()
await response.prepare(request)