# spSetMarkerDecisionFunction

Install a marker decision function.

### Synopsis

`Err spSetMarkerDecisionFunction (SPSound *sound, const char *markerName,SPDecisionFunction decisionFunc, void *decisionData)`

### Description

Install a decision function that is to be called when the player reaches the specified marker. Each marker can have a different decision function.

Clear the marker's decision function with `spCleateMarkerDecisionFunction()`.

### Arguments

sound
  Pointer to SPSound containing marker to which to install decision function.

markerName
  Name of marker in sound to which to install decision function.

decisionFunc
  An SPDecisionFunction to install, or NULL to clear.

decisionData
  A pointer to client-supplied data to be passed to decisionFunc when called. Can be NULL.

### Return Value

Non-negative value on success; negative error code on failure.

### Implementation

Library call implemented in music.lib V24.

### Notes

While a marker decision function is installed, reading from disc is interrupted every time this marker is encountered. This can have an impact on performance.

### Associated Files

soundplayer.h, music.lib

### See Also

``spClearMarkerDecisionFunction`(), spSetDefaultDecisionFunction(), SPDecisionFunction`