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

Commits on Feb 18, 2019

  1. Copy the full SHA
    3d317ae View commit details
Showing with 8 additions and 1 deletion.
  1. +8 −1 software/glasgow/applet/audio_output/__init__.py
9 changes: 8 additions & 1 deletion software/glasgow/applet/audio_output/__init__.py
Original file line number Diff line number Diff line change
@@ -101,9 +101,16 @@ def add_interact_arguments(cls, parser):
parser.add_argument(
"file", metavar="FILE", type=argparse.FileType("rb"),
help="read PCM data from FILE")
parser.add_argument(
"-l", "--loop", default=False, action="store_true",
help="loop the input samples")

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

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