mme_setscanmode()

Set the scan mode and time for a control context

Synopsis:

#include <mme/mme.h>

int mme_setscanmode( mme_hdl_t *hdl,
                     uint64_t time );

Arguments:

hdl
An MME connection handle.
time
The number of milliseconds to play a track before skipping to the next track in the tracklist. Set to 0 to disable scan mode for the current control context.

Library:

mme

Description:

The function mme_setscanmode() sets the scan mode for a control context. The scan mode setting is the maximum number of milliseconds from the beginning of the track the MME will play before going to the next track.

If the scan mode setting is changed while a track is playing, the new scan mode will take effect immediately. The MME will behave as though the new setting had been made before it started playing the track. For example, if:

then the MME will stop playing the track at 6000 milliseconds and move to the next track.

If the scan mode time is set to a value less than the time already played from a track, the MME will move immediately to the next track.

Events

This function returns MME_EVENT_SCANMODECHANGE when it has completed work.

Blocking and validation

This function blocks on control contexts. If mme_setscanmode() is called and another function is called before mme_setscanmode() returns, the second function blocks on io-media until mme_setscanmode() returns. If there are no other pending calls, mme_setscanmode() returns without blocking on io-media.

Returns:

0
Success.
-1
An error occurred (errno is set).

Classification:

QNX Neutrino

Safety:
Interrupt handler No
Signal handler No
Thread Yes

See also:

mme_getrandom(), < mme_getrepeat(), mme_getscanmode(), mme_setrandom(), mme_setrepeat()