| Pub.dsufmod: | Functions | Modinfo |
| Function uFMOD_DSPlayFile(filename:String,dwReserved,dwFlags,pDSBuffer:IDirectSoundBuffer) | |
| Returns | Returns DS_OK on success or an error value otherwise: DSERR_BUFFERLOST DSERR_INVALIDCALL DSERR_INVALIDPARAM DSERR_PRIOLEVELNEEDED |
| Description | Starts playing the given XM file. Once playback has started, it's not necessary to check for "buffer lost" condition, since uFMOD performs buffer restoring automatically. |
| 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_DSResume 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.pDSBuffer A pointer to an IDirectSoundBuffer. uFMOD assumes that it has been properly initialized to 16-bit stereo. There's an example in directx\mini_ds.bmx. |
| Function uFMOD_DSPlayMem(pXM:Byte Ptr,length,dwFlags,pDSBuffer:IDirectSoundBuffer) | |
| Returns | Returns DS_OK on success or an error value otherwise: DSERR_BUFFERLOST DSERR_INVALIDCALL DSERR_INVALIDPARAM DSERR_PRIOLEVELNEEDED |
| Description | Starts playing an XM track from memory. Once, uFMOD_DSPlayMem returns, it's safe to free/discard the memory buffer; and it's not necessary to check for "buffer lost" condition, since uFMOD performs buffer restoring automatically. |
| 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_DSResume 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.pDSBuffer A pointer to an IDirectSoundBuffer. uFMOD assumes that it has been properly initialized to 16-bit stereo. There's an example in directx\mini_ds.bmx. |
| Function uFMOD_DSPlayRes(dwName,hModule,dwFlags,pDSBuffer:IDirectSoundBuffer) | |
| Returns | Returns DS_OK on success or an error value otherwise: DSERR_BUFFERLOST DSERR_INVALIDCALL DSERR_INVALIDPARAM DSERR_PRIOLEVELNEEDED |
| Description | Starts playing an XM track from a resource image. The resource type must be RCDATA. Once playback has started, it's not necessary to check for "buffer lost" condition, since uFMOD performs buffer restoring automatically. |
| 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_DSResume 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.pDSBuffer A pointer to an IDirectSoundBuffer. uFMOD assumes that it has been properly initialized to 16-bit stereo. There's an example in directx\mini_ds.bmx. |
| Function uFMOD_DSStop() | |
| Description | Stops the currently playing song, if any. |
| Function uFMOD_DSPause() | |
| Description | Pauses the currently playing song, if any. |
| Function uFMOD_DSResume() | |
| Description | Resumes the currently paused song, if any. |
| Function uFMOD_DSGetStats() | |
| 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_DSGetTime() | |
| Description | Returns the time in milliseconds since the song was started. This is useful for synchronizing purposes. |
| Function uFMOD_DSGetTitle$() | |
| Description | Returns the current track's title, if any. |
| Function uFMOD_DSSetVolume(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 |