Using a Playlist for Recording

Memory playlists can be used in recording scenarios. For example, MESSAGE instructions are useful for notifying the application of the progress of a recording operation. A message can be sent each time the filling of a buffer is completed.

Encasing several DATA statements inside a loop using either a LOOP or BRANCH instruction allows the playlist to function as a simple circular buffering scheme. The following is an example of circular buffering:

    0:    NOP
    1:    DATA...
    2:    MESSAGE...
    3:    DATA...
    4:    MESSAGE...
    5:    DATA...
    6:    MESSAGE...
    7:    BRANCH 0

If the playlist processor executes an EXIT statement while recording, this means the playlist is full. This situation is similar to a disk becoming full during a recording operation. An ERROR_END_OF_PLAYLIST error is generated by the playlist processor in the streaming subsystem. As the recording operation continues, additional data is lost. The media driver being used returns the MCIERR_TARGET_DEVICE_FULL to the application.

LOOP, CALL, and RETURN instructions are used for iterative playing operations. These instructions are not appropriate for a recording scenario because recorded data residing in the buffer would be overwritten by each iteration.


[Back: Dynamic Playlist Modification]
[Next: Editing Operations]