| Pub.ufmod: | Functions | Modinfo |
| Function uFMOD_PlayFile(filename:String,dwReserved,dwFlags) | |
| Returns | On success, returns a pointer to an open output device handle. Returns zero on failure. |
| Description | Starts playing the given XM file. |
| Parameters |
filename A string that specifies the name of the file. dwReserved Reserved for possible future use; should be zero. dwFlags Additional flags, controlling the playback. The following values are defined:
XM_NOLOOP An XM track plays repeatedly by default. Specify
this flag to play it only once.
XM_SUSPENDED The XM track is loaded in a suspended state,
and will not play until the uFMOD_Resume function
is called. This is useful for preloading a song
or testing an XM track for validity.
Set to zero, if not using any special flags. |
| Example |
If uFMOD_PlayFile("mini.xm",0,0)
WriteStdout "Playing song... [Press Enter to quit]"
ReadStdin()
uFMOD_Stop
Else
WriteStdout "Error!"
EndIf |
| Function uFMOD_PlayMem(pXM:Byte Ptr,length,dwFlags) | |
| Returns | On success, returns a pointer to an open output device handle. Returns zero on failure. |
| Description | Starts playing an XM track from memory. Once, uFMOD_PlayMem returns, it's safe to free/discard the memory buffer. |
| Parameters |
pXM Points to an image of a song in memory. length Size of the image in bytes. dwFlags Additional flags, controlling the playback. The following values are defined:
XM_NOLOOP An XM track plays repeatedly by default. Specify
this flag to play it only once.
XM_SUSPENDED The XM track is loaded in a suspended state,
and will not play until the uFMOD_Resume function
is called. This is useful for preloading a song
or testing an XM track for validity.
Set to zero, if not using any special flags. |
| Example | Incbin "mini.xm" If uFMOD_PlayMem(IncbinPtr "mini.xm",IncbinLen "mini.xm",0) WriteStdout "Playing song... [Press Enter to quit]" ReadStdin() uFMOD_Stop Else WriteStdout "Error!" EndIf |
| Function uFMOD_PlayRes(dwName,hModule,dwFlags) | |
| Returns | On success, returns a pointer to an open output device handle. Returns zero on failure. |
| Description | Starts playing an XM track from a resource image. The resource type must be RCDATA. |
| Parameters |
dwName Specifies the ID of the XM resource. You can change this function's prototype to accept an ASCII null-terminated string, specifying the name of the resource. hModule Identifies the module whose executable file contains the resource. Could be zero if the given resource is located in the current module. dwFlags Additional flags, controlling the playback. The following values are defined:
XM_NOLOOP An XM track plays repeatedly by default. Specify
this flag to play it only once.
XM_SUSPENDED The XM track is loaded in a suspended state,
and will not play until the uFMOD_Resume function
is called. This is useful for preloading a song
or testing an XM track for validity.
Set to zero, if not using any special flags. |
| Function uFMOD_Stop() | |
| Description | Stops the currently playing song, if any. |
| Function uFMOD_Pause() | |
| Description | Pauses the currently playing song, if any. |
| Function uFMOD_Resume() | |
| Description | Resumes the currently paused song, if any. |
| Function uFMOD_GetStats() | |
| Returns | low-order word : RMS volume in R channel hi-order word : RMS volume in L channel |
| Description | Returns the current RMS volume coefficients in L and R channels. |
| Function uFMOD_GetTime() | |
| Description | Returns the time in milliseconds since the song was started. This is useful for synchronizing purposes. |
| Function uFMOD_GetTitle$() | |
| Description | Returns the current track's title, if any. |
| Function uFMOD_SetVolume(vol) | |
| Description | Sets the global volume. The volume scale is linear. Maximum volume is set by default. |
| Parameters |
vol New volume. Range: from 0 (muting) to 64 (maximum volume). Any value above 64 maps to maximum volume too. |
| Version | 1.20 |
|---|---|
| Copyright | Asterix and Quantum |