Author Topic: Delphi-BASS: FMX / VCL wrapper units for BASS audio library plus add-ons  (Read 421 times)

TDDung

  • Posts: 31
Hi,

Based on published free header/wrapper units of BASS audio library plus add-ons on www.un4seen.com, I have improved, modified and added more codes to ensure they work with all platforms that Delphi's FireMonkey and VCL frameworks support. I also collected, intensively tested and structured the libraries into a package for Delphi programmers to use with a very detailed guide accompanied. Finally I also included a simple but sufficiently complete demo project.

I have seen so many questions on BASS forums as well as other forums regarding audio for Delphi so I just thought I could share my work. That's all my intention.

Here you go: https://github.com/TDDung/Delphi-BASS

TDDung

  • Posts: 31
Delphi-BASS gives you BASS, BASSEnc plus FLAC/MP3/OGG/OPUS add-ons  :)

MikeatBookup

  • Posts: 32
Thanks for this. It allowed me to add the libraries to my Delphi FMX project, including the add ons. My project reports BASS 2.4.16.7 and BASS_Encode_MP3_GetVersion() reports 2.4.1.1.

The sample Delphi projects that come with the BASS download are apparently for VCL and I can only find an example project that records to a WAV file.

I am perplexed by the documentation which has examples in C.  I am unable to figure out the Delphi translation for the C code.

Is there sample Delphi FMX code showing how to record from a microphone to an MP3 file? I need code that runs on Mac, iOS, and Android.


TDDung

  • Posts: 31
It is very simple, just like Ian has answered you in the other post :) (https://www.un4seen.com/forum/?topic=19521.0) Alright, I will make a simple multi-platform app for you in a few days, as I need to modify my simple multi-platform app which records, playbacks and saves .WAV instead.

PS: Yes, my app has been tested successfully on all 5 platforms

MikeatBookup

  • Posts: 32
Thanks!

I am envious of anyone who finds translating C++ to Delphi "very simple."  ;D

I am also impressed that WAV recording and playback can be done on all five platforms. I am pursuing MP3 because I could not find a way to support WAV files on mobile.

TDDung

  • Posts: 31
Oh? In that case do you still want .WAV then? If so, not only you will have more control on the recording but you also have "pure" (So to speak) sound data too (and for me, I can give you my simple app with no change at all).

MikeatBookup

  • Posts: 32
Since I'm storing the short voice recordings in a database, I'm interested in the smaller data size of MP3. I don't need any special control over the recordings as they are just short voice notes.


MikeatBookup

  • Posts: 32
Thank you so much!

I have it running and it looks like it solves all the snags I was seeing from BASS_UNICODE to the callback. I appreciate it.