|Summary:||ASTERISK-06056: [patch] app_morsecode|
|Reporter:||Tilghman Lesher (tilghman)||Labels:|
|Date Opened:||2006-01-11 18:22:29.000-0600||Date Closed:||2006-01-11 22:47:57.000-0600|
|Environment:||Attachments:||( 0) app_morsecode.c|
|Description:||Play a Morse code stream, as indicated by the given string.|
|Comments:||By: Tilghman Lesher (tilghman) 2006-01-11 18:23:31.000-0600|
Let me know if there are additional characters to add.
By: Jason Parker (jparker) 2006-01-11 18:42:39.000-0600
Let me just be the first person to say...
-- --- .-. ... . / -.-. --- -.. . / .-. --- -.-. -.- ... / .-.-.-
But really though...is it good to start and stop playtones so many times? Might be able to make one long playtones list (or maybe one per letter/word?), and pass it all in at once.
tones = "440/250|0/50|440/100|
(that's the word "morse", in case you were wondering - which would have started and stopped playtones 28 times)
ast_playtones_start(chan, 0, tones, 0);
By: Tilghman Lesher (tilghman) 2006-01-11 19:39:30.000-0600
Yeah, but it's short, sweet, and allows tweaking of the lengths this way.
By: Tilghman Lesher (tilghman) 2006-01-11 19:42:06.000-0600
The other problem with trying to specify the whole thing at once is that we then have variable lengths of time that we have to wait. Remember, Playtones is asynchronous and will repeat. We absolutely do NOT want it to repeat.
By: Jason Parker (jparker) 2006-01-11 19:55:59.000-0600
You could keep track of len for an ast_safesleep, just add them up when you make the playtones string.
By: Tilghman Lesher (tilghman) 2006-01-11 22:40:15.000-0600
What's the concern with calling ast_playtones_stop() so many times? I don't think it hurts anything.
By: Tilghman Lesher (tilghman) 2006-01-11 22:47:56.000-0600
Added to trunk