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: f35ce43cfbbb
Choose a base ref
...
head repository: whitequark/glasgow
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 8053da7c8ea8
Choose a head ref
  • 1 commit
  • 1 file changed
  • 1 contributor

Commits on Feb 18, 2019

  1. Copy the full SHA
    8053da7 View commit details
Showing with 7 additions and 1 deletion.
  1. +7 −1 software/glasgow/applet/audio_output/__init__.py
8 changes: 7 additions & 1 deletion software/glasgow/applet/audio_output/__init__.py
Original file line number Diff line number Diff line change
@@ -82,6 +82,9 @@ def add_build_arguments(cls, parser, access):
parser.add_argument(
"-w", "--width", metavar="WIDTH", type=int, default=1,
help="set sample width to WIDTH bytes (default: %(default)d)")
parser.add_argument(
"-l", "--loop", default=False, action="store_true",
help="loop the input samples")

def build(self, target, args):
self.mux_interface = iface = target.multiplexer.claim_interface(self, args)
@@ -103,7 +106,10 @@ def add_interact_arguments(cls, parser):
help="read PCM data from FILE")

async def interact(self, device, args, pcm_iface):
await pcm_iface.write(args.file.read())
while True:
await pcm_iface.write(args.file.read())
if not args.loop:
break

# -------------------------------------------------------------------------------------------------