Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Catalog · How the catalog works

Random project

PascalAudio

Pascal audio classes for use with the Free Pascal Compiler

View on GitHub

Anyone may press Interesting, signed in or not. It helps others find this project.

Member rating

No ratings yet.

Sign in to rate this project.

README

Pascal Audio

Audio classes to decode and encode various formats including Ogg, Opus, Flac, m4a made for use with the Free Pascal compiler. It's also possible to use other external programs such as Sox, mpg321 or ffplay to decode any other format. It can currently output audio to the MM system of Windows or PulseAudio for Linux.

Also there can be effects applied to the audio such as resampling via libresample or libsamplerate. LADSPA2 plugins are also possible to incorporate. As well as the noise removal filter from Audacity.

It is divided into two packages: PascalAudioIO and PascalAudioSuite.

PascalAudioIO

This package contains the bindings and simple classes to directly use the libraries such as libogg or libflac etc. If you don't want to use the "Suite" which has a somewhat complicated threaded mechanism, then you need only this.

PascalAudioSuite

Using "Links" starting with a Source link and ending with a Destination link it's possible to decode an audio file and convert/play it using any links. If the final link in the chain is PulseAudio then the decoded file will play on the speakers. Each link in the chain operates inside its own thread and processes the data before handing off its buffer to be handled by the next link.

To apply some effect to the decoded audio just insert some links into the middle of the chain. See the examples folder to see how simple this is.

Adding new codecs or sources and destinations

Adding new codecs is really not that hard and can be done in a few minutes or hours as long as the binding already exists.