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

Audio Recorder And Player Component For Delphi/C++ FireMonkey Applications.

Do you want to build the Audio recorder and Player capabilities in your FireMonkey Applications? Not Sure Where to and How to start with? Don’t worry, you’re at the right place. WINSOFT Audio Component Suite for FireMonkey helps to build audio capabilities in your application faster. This Audio Component suite uses Standard Windows Waveform Audio API. It contains both a Recorder and Player component.

Features:

Versions Supported: Delphi/C++ Builder XE7 – Delphi 10.4 FireMonkey Applications.

Platforms: Windows, OS X, Android and iOS;

Installation Steps:

Prerequisites: Ensure 3.7 MB minimum free space available in the system.

Installation Steps Demo:

How to build your application with Audio Suite Component for FireMonkey:

1.Open RAD Studio 10.4, Navigate to Components bar -> System. Check the Audio Suite Components installed as shown.

2. Drag and Drop the TFRecorder and TFPlayer component or by adding FAudioCS.pas into your unit and create these components by code.

Active : Opens or closes the Waveform-audio input/output device.

Device: The identifier of the waveform-audio Provides the list of Audio input/output devices(0 to N) in the system. The default value is MapperDevice i.e) Waveform Audio input/output device capable of recording/playing the given format. DeviceCount property gives the total number of audio devices. DeviceName[Device: Integer] provides the product name.

Capabilities: Read-only property, provides information about device manufacturer, product identifier, product name, major, minor, standard formats, Channels (mono or stereo).

OnBufferNeeded: A new buffer is needed for audio recording/playback, Recorded/playback waveform data will be placed to this buffer.

OnBufferReleased: Buffer with recorded/playback waveform-audio data is available.

Save: Write PCM Data to the specified file.

Load: Retrieves PCM parameters and data from the specified file.

TFRecorder;

FPlayer Properties

3. Create a buffer of some fixed size and add to the buffer list when file size grows using onbufferneeded and increase the record size onbufferReleased.

4. Select the Device from the DeviceCount list.

5. FRecorder.Open // Make active the recorder device for recording

6. FRecorder.Start // Start Recording.

7. FRecorder.Stop // Stop Recording

8. FRecorder.Reset// Resets the current position to zero. All pending buffers are stored in the application. To start fresh recording Reset and clear the buffers and start recording.

9. Save the recorded buffer to the user-specified file by Save Procedure.

Hope you have progressed to record the audio successfully. Curious to play the recorded Audio? Here we go!

10. Load the recorded audio using Load function by an open dialog and store to the buffer list.

<strong>FPlayer Properties<strong>

11.Select the Audio Output Device from DeviceCount list.

12.FPlayer.Open // Make active the Audio output device for playing

13.FPlayer.Play // Play the audio from the buffer list using onbufferneeded and increase the size onbufferReleased.

14.FPlayer.Pause // Pause the audio at some position in samples.

15.FPlayer.Resume // Resume playing from the last position it paused.

16.FPlayer.Stop // stop playing the Audio.

17.FPlayer.LeftVolume/RightVolume // Adjust the Volume between 0 to 65535 for left and right volume.

Other features: Adjusting the values of Pitch, PitchValue, PlaybackRate, and PlaybackValue based on Audio device supports.

Note: You can update the position of recording/playing by Samples, Milliseconds, Bytes, Midi Time.

Sample Application Demo:

Conclusion: It’s that simple to build recorder and player functionality in your applications. WINSOFT saved our time in nailing the Windows API and boost our productivity.

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

Head over and check out the full WINSOFT Audio Component Suite for Access in Delphi and C++Builder.

Like what you see? You can get Audio Component Suite and over 100 other fantastic WinSoft components with our Enterprise Component Pack. For a limited time, when you purchase RAD Studio Enterprise or Architect Edition at special Upgrade Pricing, you will also get this package of third-party software worth over $13,000, including the full WinSoft Component Library, at NO EXTRA COST! Step up to RAD Studio 10.4 today!

Exit mobile version