## MMPM/2 Device Driver Reference

[prev][next][parent][TOC]

### Limitations of MM_MCIPOSITIONCHANGE Verification

There are limitations to what you can verify in the P2STRING tool using event notification lines. The MM_MCIPOSITIONCHANGE line requires the use of the "return value" item in the respective string commands. This line also does not provide for timing start point, for example, playing has started. The P2STRING tool can only count the number of messages received for a specific user parameter (used as a key) and check if subsequent messages have positions approximate to the given expected position interval. The script writer has the responsibility to determine how many POSITIONADVISE messages are expected, taking into account the duration of playing, time format, and start position of the play/record. The reference position given in the expected notification line must be in MMTIME units. If the "expected number of messages" parameter is omitted, the tool verifies only the position interval (not the number). In case of scripts where play, seek, or record are used to cover non-monotonic ranges, the tool might report failures on position-advises because it expects each positionadvise to be in the next position interval from the previous message. If the script makes a jump to a position that does not conform to this, the status will be logged as failed.

For example:

    setpositionadvise SomeDevice every 10000 on return 5

    +MM_MCIPOSITIONCHANGE 10000 %5

    play SomeDevice from 35000 to 55000 notify (produces 3 positionchange messages)

    seek SomeDevice to 30000 wait

    play SomeDevice notify (produces a number of messages starting at 30000)

The position-change messages are logged as failed, because of the lapse in position interval. A way to handle this situation is to disable the position-change before an explicit position jump is made and enable the same position-advise with a different user parameter.

For example:

    setpositionadvise SomeDevice every 10000 on return 5

    +MM_MCIPOSITIONCHANGE 10000 %5

    play SomeDevice from 35000 to 55000 notify (produces 3 positionchange messages)

    setpositionadvise SomeDevice every 10000 off

    seek SomeDevice to 30000 wait

    setpositionadvise SomeDevice every 10000 on return 6

    +MM_MCIPOSITIONCHANGE 10000 %6

    play SomeDevice notify (produces a number of messages starting at 30000)