Changing sequences in an audio player

You can load a different sequence into an audio player, but like a real-world cassette player, you must remove the current cassette before you can load the new one.

Removing the current sequence

Use TAudioPlayer::OrphanSequence to remove the current sequence from a player:

      // aPlayer is a default audio player; oldSequence is the current sequence.
      aPlayer.OrphanSequence();
      delete  oldSequence;

Inserting a new sequence

Use TAudioPlayer::AdoptSequence to load a new sequence into a player:

      // aPlayer is a default audio player.
      // newSequence is an instance of a class derived from TAudioSequence.
      aPlayer.AdoptSequence(newSequence);

[Contents] [Previous] [Next]
Click the icon to mail questions or corrections about this material to Taligent personnel.
Copyright©1995 Taligent,Inc. All rights reserved.

Generated with WebMaker