Uematsu.DLL Documentation

Written by Marius Fodor.
DLL created by Marius Fodor.
SPC700/DSP core by Anti Resonance.

This is a simple HTML for the functions exported by Uematsu.DLL, click on one of the links below to jump directly to the text for that function. I would have used frames to do this, but only if I knew how to do frames. :-(

Uematsu_SetWindowHandle
Uematsu_GetConfiguration
Uematsu_SetConfiguration
Uematsu_Play
Uematsu_Stop
Uematsu_Pause
Uematsu_UnPause
Uematsu_SetWAVOutputFileName
Uematsu_GetPlayTime
Uematsu_SetPlayTime
Uematsu_SetSongLength
Uematsu_SetSongSpeed
Uematsu_SetSongPitch
Uematsu_SetMainSS
Uematsu_SetEchoSS
Uematsu_SetPreAmp
Uematsu_SetMixingThreadPriority
Uematsu_IsActive
Uematsu_IsPlaying
Uematsu_HasFailed
Uematsu_MuteChannels
Uematsu_GetVisParams
Uematsu_LoadID666Tag
Uematsu_SaveID666Tag
Uematsu_GetCoreInfo
Uematsu_GetCurrentPreamp

Uematsu_SetWindowHandle

The Uematsu_SetWindowHandle function takes the handle of a window that will be used as the owner of popup dialog boxes.

BOOL WINAPI Uematsu_SetWindowHandle(
  HWND hWndOwner
);

Return Value

Nonzero if successful; otherwise, 0.

Parameters

hWndOwner
Specifies the handle of a window to be the owner of popup dialog boxes.

Uematsu_GetConfiguration

The Uematsu_GetConfiguration function retrieves the current configuration for the engine.

BOOL WINAPI Uematsu_GetConfiguration(
  LPUEMATSUCONFIG lpuc
);

Return Value

Nonzero if successful; otherwise, 0.

Parameters

lpuc
Pointer to an UEMATSUCONFIG structure to receive the current configuration.

Uematsu_SetConfiguration

The Uematsu_SetConfiguration function sets the current configuration for the engine.

BOOL WINAPI Uematsu_SetConfiguration(
  LPUEMATSUCONFIG lpuc
);

Return Value

Nonzero if successful; otherwise, 0.

Parameters

lpuc
Pointer to an UEMATSUCONFIG structure that contains the configuration to set.

Uematsu_Play

The Uematsu_Play function loads an SPC file and starts playing it.

BOOL WINAPI Uematsu_Play(
  LPCTSTR lpszFileName
);

Return Value

Nonzero if successful; otherwise, 0.

Parameters

lpszFileName
Pointer to a null-terminated string that contains the name of the SPC file to load and play.

Uematsu_Stop

The Uematsu_Stop function stops any currently playing song.

BOOL WINAPI Uematsu_Stop();

Return Value

Nonzero if successful; otherwise, 0.


Uematsu_Pause

The Uematsu_Pause function pauses a currently playing song.

BOOL WINAPI Uematsu_Pause();

Return Value

Nonzero if successful; otherwise, 0.


Uematsu_UnPause

The Uematsu_UnPause function resumes a previously paused song.

BOOL WINAPI Uematsu_UnPause();

Return Value

Nonzero if successful; otherwise, 0.


Uematsu_SetWAVOutputFileName

The Uematsu_SetWAVOutputFileName function specifies the file name to use for dumping to WAV, and whether to output with or without sound.

BOOL WINAPI Uematsu_SetWAVOutputFileName(
  LPCTSTR lpszFileName
  BOOL bWithSound
);

Return Value

Nonzero if successful; otherwise, 0.

Parameters

lpszFileName
Pointer to a null-terminated string that contains the file name for the WAV output. Specify a NULL pointer to turn off WAV dumping.
bWithSound
Flag indicating whether to dump to the WAV file with (TRUE) or without (FALSE) sound.

Uematsu_GetPlayTime

The Uematsu_GetPlayTime function returns the current playing time.

UINT WINAPI Uematsu_GetPlayTime();

Return Value

A UINT value representing the current playing time in milliseconds.


Uematsu_SetPlayTime

The Uematsu_SetPlayTime function seeks to the playing time specified.

BOOL WINAPI Uematsu_SetPlayTime(
  UINT uTime
  BOOL bFastSeek
);

Return Value

Nonzero if successful; otherwise, 0.

Parameters

uTime
Specifies the time to seek to in milliseconds.
bFastSeek
Specifies whether to use fast (TRUE) or slow (FALSE) seeking. The only problem with the fast seeking is that it can break some songs.

Uematsu_SetSongLength

The Uematsu_SetSongLength function specifies the current length and fade length to use when playing a song.

BOOL WINAPI Uematsu_SetSongLength(
  UINT uSong
  UINT uFade
);

Return Value

Nonzero if successful; otherwise, 0.

Parameters

uSong
Specifies the length for the song in milliseconds.
uFade
Specifies the fading length for the song in milliseconds.

Uematsu_SetSongSpeed

The Uematsu_SetSongSpeed function sets the current speed or tempo to use when playing a song.

BOOL WINAPI Uematsu_SetSongSpeed(
  UINT uSpeed
);

Return Value

Nonzero if successful; otherwise, 0.

Parameters

uSpeed
Specifies the speed, the normal value is 65536.

Uematsu_SetSongPitch

The Uematsu_SetSongPitch function sets the current base pitch to use when playing a song.

BOOL WINAPI Uematsu_SetSongPitch(
  UINT uPitch
);

Return Value

Nonzero if successful; otherwise, 0.

Parameters

uPitch
Specifies the base pitch, the normal value is 32000.

Uematsu_SetMainSS

The Uematsu_SetMainSS function sets the current main stereo separation.

BOOL WINAPI Uematsu_SetMainSS(
  UINT uSeparation
);

Return Value

Nonzero if successful; otherwise, 0.

Parameters

uSeparation
Specifies the current separation, the normal value is 32768.

Uematsu_SetEchoSS

The Uematsu_SetEchoSS function sets the current echo stereo separation or feedback crosstalk.

BOOL WINAPI Uematsu_SetEchoSS(
  INT nSeparation
);

Return Value

Nonzero if successful; otherwise, 0.

Parameters

nSeparation
Specifies the current separation, the normal value is 32768.

Uematsu_SetPreAmp

The Uematsu_SetPreAmp function sets the current preamplification level.

BOOL WINAPI Uematsu_SetPreAmp(
  UINT uPreAmp
);

Return Value

Nonzero if successful; otherwise, 0.

Parameters

uPreAmp
Specifies the preamplification level, the valid range is from 0 to 256, but 35-50 is usually ideal.

Uematsu_SetMixingThreadPriority

The Uematsu_SetMixingThreadPriority function sets the current priority level for the sound mixing thread.

BOOL WINAPI Uematsu_SetMixingThreadPriority(
  INT nPriority
);

Return Value

Nonzero if successful; otherwise, 0.

Parameters

nPriority
Specifies the priority level for the mixing thread. This parameter can be one of the following values:
Priority Meaning
THREAD_PRIORITY_ABOVE_NORMAL Indicates 1 point above normal priority for the priority class.
THREAD_PRIORITY_BELOW_NORMAL Indicates 1 point below normal priority for the priority class.
THREAD_PRIORITY_HIGHEST Indicates 2 points above normal priority for the priority class.
THREAD_PRIORITY_IDLE Indicates a base priority level of 1 for IDLE_PRIORITY_CLASS, NORMAL_PRIORITY_CLASS, or HIGH_PRIORITY_CLASS processes, and a base priority level of 16 for REALTIME_PRIORITY_CLASS processes.
THREAD_PRIORITY_LOWEST Indicates 2 points below normal priority for the priority class.
THREAD_PRIORITY_NORMAL Indicates normal priority for the priority class.
THREAD_PRIORITY_TIME_CRITICAL Indicates a base priority level of 15 for IDLE_PRIORITY_CLASS, NORMAL_PRIORITY_CLASS, or HIGH_PRIORITY_CLASS processes, and a base priority level of 31 for REALTIME_PRIORITY_CLASS processes.


Uematsu_IsActive

The Uematsu_IsActive function indicates whether the engine is currently active.

BOOL WINAPI Uematsu_IsActive();

Return Value

Nonzero if the engine is active; otherwise, 0.


Uematsu_IsPlaying

The Uematsu_IsPlaying function indicates whether a song is currently playing.

BOOL WINAPI Uematsu_IsPlaying();

Return Value

Nonzero if a song is playing; otherwise, 0.


Uematsu_HasFailed

The Uematsu_HasFailed function indicates whether the mixing thread has failed to do something while playing.

BOOL WINAPI Uematsu_HasFailed();

Return Value

Nonzero if the mixing thread has failed; otherwise, 0.


Uematsu_MuteChannels

The Uematsu_MuteChannels function mutes or unmutes the 8 DSP channels.

BOOL WINAPI Uematsu_MuteChannels(
  INT nChannels
);

Return Value

Nonzero if successful; otherwise, 0.

Parameters

nChannels
Bitmask indicating which channel to mute or unmute. Bit 0 represents channel 0, bit 1 represents channel 1, etc. A value of 1 means mute and a value of 0 means unmute.

Uematsu_GetVisParams

The Uematsu_GetVisParams function retrieves the current visualization related parameters of the engine.

BOOL WINAPI Uematsu_GetVisParams(
  LPUEMATSUVISPARAMS lpuvp
);

Return Value

Nonzero if successful; otherwise, 0.

Parameters

lpuvp
Pointer to an UEMATSUVISPARAMS structure to receive the current visualization related parameters.

Uematsu_LoadID666Tag

The Uematsu_LoadID666Tag function reads the ID666 tag of an SPC file.

BOOL WINAPI Uematsu_LoadID666Tag(
  LPCTSTR lpszFileName
  LPID666TAG lpTag
);

Return Value

Nonzero if successful; otherwise, 0.

Parameters

lpszFileName
Pointer to a null-terminated string that contains the file name of the SPC file.
lpTag
Pointer to an ID666TAG structure to receive the ID666 tag fields.

Uematsu_SaveID666Tag

The Uematsu_SaveID666Tag function saves an ID666 tag to an SPC file.

BOOL WINAPI Uematsu_SaveID666Tag(
  LPCTSTR lpszFileName
  LPID666TAG lpTag
);

Return Value

Nonzero if successful; otherwise, 0.

Parameters

lpszFileName
Pointer to a null-terminated string that contains the file name of an SPC file.
lpTag
Pointer to an ID666TAG structure that specifies the ID666 fileds to write to the SPC file.

Uematsu_GetCoreInfo

The Uematsu_GetCoreInfo function retrieves the version, minimum supported version and miscellaneous options for the core SNESAPU.DLL engine.

BOOL WINAPI Uematsu_GetCoreInfo(
  LPUINT lpuVersion
  LPUINT lpuMinVersion
  LPUINT lpuOptions
);

Return Value

Nonzero if successful; otherwise, 0.

Parameters

lpuVersion
Pointer to a UINT variable that is to receive the version number of the core engine.
lpuMinVersion
Pointer to a UINT variable that is to receive the minimum version that the core engine is backwards compatible with.
lpuOptions
Pointer to a UINT variable that is to receive various compiler related options for the core engine.

Uematsu_GetCurrentPreamp

The Uematsu_GetCurrentPreamp function returns the current preamplification level, which can change dynamically depending on the APR setting.

UINT WINAPI Uematsu_GetCurrentPreamp();

Return Value

A UINT value representing the current preamplification level.