Media_Set ( tag { ; value } )
The Media_Set function allows you to control the Media_InsertQuickTime function’s interaction with QuickTime. MediaManager uses a couple of workarounds to sidestep some known bugs in QuickTime.
Parameter | Description |
---|---|
tag | one of several values: “Volume”, “Tempo”, “Balance”, “lmworkaround”, “rfworkaround”. |
value | (see below). |
Both workarounds are set to being “on” by default – and under most circumstances you will want them to remain on. These workarounds exist primarily for circumstances when you may want to turn them off, especially if QuickTime eventually fixes the bugs and you want to rely on the standard QT process.
Examples
Volume
Sets the playback volume for Media_PlaySound.
Set Field [ MyTable::Result ; Media_Set ( "Volume" ; value ) ]
1 = normal playback volume
Setting the volume to greater than 1, such as “5”, will result in a louder playback. A volume of less than one, such as “.7”, gives a quieter playback result.
Tempo
Sets the tempo or audio speed of the Media_PlaySound playback.
Set Field [ MyTable::Result ; Media_Set ( "Tempo" ; value ) ]
1 = normal playback speed
A tempo of less than one, such as “.5”, gives a slower playback speed. A tempo greater than one, such as “2”, will result in a faster playback speed.
To reverse playback, set the tempo to a negative value.
Balance
This value sets the balance between left and right audio channels during Media_PlaySound playback.
Set Field [ MyTable::Result ; Media_Set (“Balance” ; balanceValue ) ]
- 0 = equal balance
- -1 = full left channel
- 1 = full right channel
The balanceValue parameter should be a number between -1 and 1.
Compatibility with Earlier Versions of QuickTime
lmworkaround
The “lmworkaround” tag – linking media workaround – allows you to work with earlier versions of QuickTime. Because QuickTime 7.1.5 incorporates significant “linking media” bug fixes that affect how FileMaker Pro inserts QuickTime sound files, MediaManager by default expects to work with QuickTime 7.1.5. If you want to be able to work with earlier versions of QuickTime.
Set Field [ MyTable::Result ; Media_Set ( "lmworkaround" ; True ) ]
value parameter –
- True or 1 – This allows the end user to have earlier versions of QuickTime installed. MediaManager checks the version of QT at startup against 7.1.5. At each function call, if it is earlier than 7.1.5, then the workaround is applied.
- False or 0 – Media linking is never done. The developer is responsible for checking the version of QT and refusing to run if it is not recent enough.
- “never set” – The version of QuickTime is checked at startup. During any relevant function call, QT version is tested against 7.1.5. If earlier, then the user gets this one-time dialog:
- “The MediaManager plug-in requires the latest version of QuickTime. Please quit FileMaker now, and install QuickTime from quicktime.apple.com.” (OK only)
Inserting Remote Sound Files
With the “rfworkaround” tag – remote file workaround – MediaManager sidesteps a bug that causes FileMaker Pro to crash on Windows when attempting to insert QuickTime sound files from a remote volume.
Set Field [ MyTable::Result ; Media_Set ( "rfworkaround" ; True ) ]
In order to avoid the FileMaker crash, MediaManager essentially copies the remote file to the local volume’s temporary directory before inserting it.
Important
Because the inserted sound file actually resides in the temporary folder, that means that the sound file will be lost when the temporary file resets on shut down. In order to avoid this, you must relocate the source file. An easy way to do this is to immediately follow the insert steps with exporting the sound file to a stable location.
Remote File Warning Dialog
The first time (after launching FileMaker Pro) that you call Media_InsertQuickTime to insert a sound file from a remote volume, the following dialog will be displayed.
“MediaManager’s Media_InsertQuicktime is about to us a workaround for a bug in QuickTime while accessing remote media. This workaround may cause the FileMaker script to fail. Please see the documentation for Media_InsertQuickTime for complete information.”
You can prevent this dialog from appearing by setting “rfworkaround” to True before calling Media_InsertQuickTime.
value parameter –
- True or 1 – Use the remote file copying workaround on Windows. Also suppresses the remote file warning dialog.
- False or 0 – Disable the workaround