Set track parameters.
int mmr_track_parameters( mmr_context_t *ctxt, unsigned index, strm_dict_t *parms )
- A context handle.
- Zero to set the default parameters, or a nonzero index within the current playlist window.
- A dictionary containing the track parameters to set. Use NULL to reset the parameters of the specified track to the default values assigned to track 0. Any previous parameters are overridden. The strm_dict_t object becomes API property after this call, even if the call fails. You should not use or destroy the dictionary after passing it to this function.
Set track parameters. This function can be used only when the input type is "playlist".
The index specifies the track to which these parameters are applied. This value must be within range of the current playlist window; otherwise, the function call fails. An index of zero specifies default parameters that are given to any new track that enters the playlist window.
Some mm-renderer plugins don't return errors when you provide unacceptable values for track parameters. Instead, these plugins revert bad parameters to their previous values or to their default values (for parameters that you set for the first time). To see which values were accepted or changed, client applications can examine the parameters that the Event API returned.
When the input URL starts with audio:, you can set one of the following two parameters:
- Classify the audio track based on its content (voice, ring tones, video chat, etc.). This parameter provides a shortcut for setting the audio type, thereby simplifying your client code. You can use this parameter instead of using the Audio Manager API to obtain an audio manager handle, and then using that handle to set the audio type. The audio type is specified as a string that's set to one of the audio types defined by AUDIO_TYPE_NAMES, which is documented in the Audio Manager Library reference.
- Associate an audio manager handle with the audio stream that the current context manages. To obtain a value for this parameter, call the audio_manager_get_handle() API function and pass in the desired audio type. You can then use this handle to change the audio type and other audio stream characteristics through the Audio Manager API. For more information, refer to the audio routing functions described in the Audio Manager Library reference.
Zero on success, -1 on failure (use mmr_error_info()).