Get access to over 100 FireMonkey cross platform samples for Android, IOS, OSX, Windows, and Linux!


Free Game Audio Manager Wrapper Class In Delphi XE6 Firemonkey For Android, IOS, Windows, and OSX

| Delphi 11 10 XE8 XE7 XE Seattle Berlin Tokyo Rio Firemonkey Delphi Android Delphi IOS

Delphi XE6 Firemonkey Audio Manager Class | Delphi 11 10 XE8 XE7 XE Seattle Berlin Tokyo Rio Firemonkey Delphi Android Delphi IOSIf you want to be able to play multiple simultaneous audio files across all platforms in Delphi XE6 Firemonkey you should check out this TGameAudioManager class. I had it built by a professional developer through oDesk and it is architected for playing lots of short sound files (like game sound effects) in Firemonkey. I had need of this class when I was building the Flappy Bird clone and finally got around to having it built. It uses the native sound API from each of the supported platforms which are Windows, Android, IOS, and OSX. The least amount of testing has been done on the OSX implementation but overall it feels pretty solid. For music (long running audio files) you should stick with the built in TMediaPlayer component. The TGameAudioManager class is built so that you pre-register the sounds that you are going to play with AddSound() and then you play them with PlaySound(). It is written in Object Pascal and should also compile in AppMethod (and probably Delphi XE5) without much trouble. There is a mobile and a desktop demo included in the archive. Here is the class type information:
  TGameAudioManager = Class
fSoundsList : TList;

fAudioMgr : JAudioManager;
fSoundPool : JSoundPool;

function GetSoundsCount : integer;
function GetSoundFromIndex(Aindex : integer) : PSoundRec;
Constructor Create;
Destructor Destroy;override;

function AddSound(ASoundFile: string) : integer;
procedure DeleteSound(AName : String); overload;
procedure DeleteSound(AIndex : integer); overload;
procedure PlaySound(AName : String);overload;
procedure PlaySound(AIndex : integer);overload;

property SoundsCount : Integer read GetSoundsCount;
property Sounds[AIndex : integer] : PSoundRec read GetSoundFromIndex ;

Download TGameAudioManager, the free audio manager wrapper class in Delphi XE6 Firemonkey for Android, IOS, Windows, and OSX.

Have Delphi Firemonkey questions? Ask and get answers on StackOverflow.

Related posts

AutoBlogAI: FireMonkey Client To Leverage LLMs And Generative AI For Blogging


Unleashing Creativity With Song Writer AI: A Deep Dive


How To Build Stable Diffusion Text To Image Prompts


FireMonkey 10.4.2 Features Updated iOS 14, Android 11, And macOS 11 Support Plus Hundreds Of Fixes

Sign up for our Newsletter and
stay informed


Leave a Reply to Dave Cancel reply