VoiceClip (RDMLX)

Please do not use to report errors- use your regional help desk.
Please mark posts as being for RPG or RDMLX (LANSA) developer.
To subscribe by email, display this forum, scroll to the end and select ‘Subscribe Forum’.
Post Reply
soapagent
Posts: 93
Joined: Mon Jul 16, 2012 6:19 pm

VoiceClip (RDMLX)

Post by soapagent »

A couple of questions about voice clip. It's not clear from the documentation how to save the voiceclip back to the iSeries host when the recording is stopped. Also is the voiceclip stored on the deveice during the recording and if so can it be retrieved at a later time. This is in case connectivity is lost during the recording.
tsupartono
Posts: 289
Joined: Wed Apr 18, 2012 10:21 am

Re: VoiceClip (RDMLX)

Post by tsupartono »

You'd first need to submit the form as usual using an action (e.g. by setting up the OnClick property of a submit button, and handles the appropriate action in your RDML program)

In your RDML progrma, you can get the recorded voiceclip by reading the VoiceClip property.
The usage is illustrated in LREX0018 from the standard LongRange example set.
For your convenience, I have also included the relevant code fragments here:

Code: Select all

* First check if the user recorded anything
#uStatus := #Com_Owner.CheckProperty( '/Form.Fields.ADDVOICE.VoiceClip' )

If (#uStatus)
   * Construct filename
   #uFileName := *PART_DIR_EXECUTE + 'LREX0018_' + #LRNGSERVICES.GenerateUUID + '.ima4'

   * Save voiceclip
   #Com_Owner.Save_Voiceclip Name(ADDVOICE) Filename(#uFileName)
Endif
The recording is stored locally but it will be deleted once the user navigates away from the form.
So as long as they remain on that particular form, they can still submit the voice recording at a later time.
Post Reply