Site icon Embarcadero RAD Studio, Delphi, & C++Builder Blogs

Create Robust Core Music Player Functionality For Windows In Delphi With FMX Sample

The MusicPlayer application uses controls such as TProgressBar, and TTrackBar, and platform-specific technologies such as MPMusicPlayerController for iOS, to show how to create a music player.

Your device needs to have at least one song so that you can see the application functionality. The sample allows the audio files listing and standard media controls like play, pause, and volume.

Note: The FireMonkey library contains a TMediaPlayer component that you can use instead of writing your own media player. The FMX.MediaPlayerHD Sample shows how to use TMediaPlayer.

Location

You can find the MusicPlayer sample project at:

Learn more about AIMP and some of the most inviting features of this audio player and organizer according to its developer.

How to Use the Sample

  1. Navigate to the one of the locations given above, and open:
    • Delphi: FMMusicPlayer.dproj
    • C++: FMMusicPlayer.cbproj
  2. Press F9 or choose Run > Run.
  3. Click an item from the list on your mobile device.
  4. Click the Play button.

5. Click the Pause button to pause the song, or the Stop button to stop playing the song.

6. Click the Previous button, or the Next button to go through the list items.

7. On the top toolbar, click the SettingsSpeedButton.

8. Click the Back SpeedButton to go back to the song list.

Files

FileContains
MediaPlayerUContains the base form.
MediaPlayerThe project itself.

Classes

TFMXMusicPlayerFrm is the form of the application. This class contains objects like: TActionListTTabControlTTimerTSpeedButton, or TTrackBar.

Implementation

Fore more details and more links to other sample, please visit the link below:

Head over and check out the full Delphi source code for a music player on GitHub.

Head over and check out the full C++ source code for a music player on GitHub.

Exit mobile version