projects
/
mw2txt.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d7dfbad
)
posts:gstreamer:beep: use argparse default values for frequency.
author
W. Trevor King
<wking@tremily.us>
Fri, 14 Sep 2012 16:32:56 +0000
(12:32 -0400)
committer
W. Trevor King
<wking@tremily.us>
Fri, 14 Sep 2012 16:32:56 +0000
(12:32 -0400)
posts/GStreamer/beep.py
patch
|
blob
|
history
diff --git
a/posts/GStreamer/beep.py
b/posts/GStreamer/beep.py
index 55ecf63cf4ad357c010112e1f7cc067a537c0142..50bb305e3b0f3ee4d498003468ff1874fcac7f92 100755
(executable)
--- a/
posts/GStreamer/beep.py
+++ b/
posts/GStreamer/beep.py
@@
-31,14
+31,11
@@
if __name__ == '__main__':
parser = argparse.ArgumentParser(description='Play a pure tone')
parser.add_argument(
- '-f', '--frequency', type=float, help='tone frequency in Hz')
+ '-f', '--frequency', type=float, default=440,
+ help='tone frequency in Hz')
args = parser.parse_args()
- frequency = 440
- if args.frequency:
- frequency = args.frequency
-
- start=Beep(frequency=frequency)
+ start=Beep(frequency=args.frequency)
while True:
time.sleep(10)