Media_GetSoundInfo ( container )
Media_GetSoundInfo gives you detailed information about the specified sound file, including format, duration, sample size, sample rate, and bit rate.
Parameter | Description |
---|---|
container |
Location of the sound file. |
To pick out specific pieces of information, use the Media_ExtractInfo function.
Because the information returned by this function is hierarchical and indented, it can be helpful to display the returned information with a font that uses equal character spacing, such as Courier.
Commit Record Note
If Media_GetSoundInfo does not immediately return a value, such as after a sound has just been recorded, you may need to click outside of a field or use FileMaker Pro’s Commit Records/Requests script step.
Returns
Media_GetSoundInfo returns a hierarchical list of information on the specified sound file, such as:
Format: AIFF
Track 1
Volume: 256
Duration (s): 000:00:01.207
Creation Date (ts): 22-08-2005 12:39:43
Modification Date (ts): 22-08-2005 12:39:43
Media
Media Duration (s): 000:00:01.207
Media Creation Date (ts): 22-08-2005 12:39:43
Media Modification Date (ts): 22-08-2005 12:39:43
Media Language: 0
Media Quality: 0
Sample Description 1
Sample Format: 74776F73
Number of Channels: 2
Sample Size (b): 16
Sample Rate (Hz): 44100
Bit Rate (kbps): 64
Examples
To place all of the sound info in a field named “Sound Data”:
Set Field [ MyTable::Sound Data ;
Media_GetSoundInfo (MyTable::Container) ]
To put the sample size and sample rate values into fields named “Size” and “Rate”:
Set Field [ MyTable::Size ;
Media_ExtractInfo (
Media_GetSoundInfo (MyTable::Container) ;
"Track 1/Media/Sample Description 1/Sample Size"
) ]
Set Field [ MyTable::Rate ;
Media_ExtractInfo (
Media_GetSoundInfo (MyTable::Container) ;
"Track 1/Media/Sample Description 1/Sample Rate"
) ]
To isolate the bit rate:
Set Field [ MyTable::Bit Rate ;
Media_ExtractInfo (
Media_GetSoundInfo (MyTable::Container) ;
"Track 1/Media/Sample Description 1/Bit Rate"
) ]