Add two more TImage to the form. Set the TImage.Bitmap property of each TImage to images that are suggestive for the play and pausing processes. The usual icon for playing process is an arrow and for pausing are two parallel vertical bars.

Set all images on the same position and with the same sizes. The tree images are total superimposed.

Set the Opacity property for all images to 0. The visible image will be the image that shows the current running process.

Implementation

1. Double-click the Play button to attach OnClick event handlers to it.

procedure TForm1.PlayButtonClick(Sender:TObject);begin// This application plays only recorded data, so if there is no data recorded there is nothing to play.if(Mic <> nil)and(Mic.State= TCaptureDeviceState.Stopped)thenbegin//specifies the file to be played.
MediaPlayer1.FileName:= Mic.FileName;//checks if the data can be decoded.if MediaPlayer1.Media <> nilthenbeginif(MediaPlayer1.State= TMediaState.Stopped)thenbegin
Timer1.Enabled:=true;
StopPlayButton.Enabled:=true;
MediaPlayer1.Play;//updates the opacity of each image// Image2 shows the play sign
Image1.Opacity:=0;
Image2.Opacity:=1;
Image3.Opacity:=0;end;end;endelsebegin
ShowMessage('The audio device is still capturing');end;end;