This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revision Both sides next revision | ||
built_in:audiorecorder [2018/05/20 23:45] geez437 [Create] |
built_in:audiorecorder [2018/05/20 23:48] geez437 [Table] |
||
---|---|---|---|
Line 19: | Line 19: | ||
Some controls use the same methods.\\ | Some controls use the same methods.\\ | ||
For examples of the **[[same methods]]** look here. | For examples of the **[[same methods]]** look here. | ||
- | ^ Method | + | ^ Method |
- | | AudioRecorder.GetRMS() | + | | AudioRecorder.GetRMS() |
- | | AudioRecorder.GetType() | + | | AudioRecorder.GetType() |
- | | AudioRecorder.Pause() | + | | AudioRecorder.Pause() |
- | | AudioRecorder.SetFile( p1 ) | + | | AudioRecorder.SetFile( p1 ) | Use the SetFile method to tell the object where to store the sound |
- | | AudioRecorder.Start( p1 ) | + | | AudioRecorder.Start( p1 ) | The Start method tells it to start recording |
- | | AudioRecorder.Stop() | + | | AudioRecorder.Stop() |
+ | ==== Example ==== | ||
+ | <code javascript> | ||
+ | function OnStart() | ||
+ | { | ||
+ | rec = app.CreateAudioRecorder(); | ||
+ | rec.SetFile( "/ | ||
+ | rec.Start(); | ||
+ | app.ShowPopup(" | ||
+ | setTimeout(stopit, | ||
+ | } | ||
+ | |||
+ | function stopit() | ||
+ | { | ||
+ | app.ShowPopup(" | ||
+ | rec.Stop(); | ||
+ | } | ||
+ | </ |