Recent

Author Topic: LiteSound - my set of code packages for working with audio files and streams  (Read 1696 times)

iLya2IK

  • New Member
  • *
  • Posts: 34
A set of classes for playing, recording and converting audio files and audio streams. In addition, the package contains classes and interfaces for working with resamplers, spectrum extractors and audio signal filtering. Uses the principles of dynamic linking of libraries. Supports audio formats WAV, FLAC, Vorbis and Opus (including for the organization of streaming audio frames).
The structure of the packages has not yet been fully determined. I continue to work on structuring the class hierarchy. I will also try to improve code commenting.

Source code you can find on GitHub

Examples
  • Player example - This example emulates the operation of a simple audio player, demonstrates working with comments, metadata, playlists.
  • Recorder example - This example emulates the operation of a simple audio recorder.
  • Converter example - This example emulates the operation of a simple audio file converter.
  • FrameStreaming example - In this example, an audio-ogg file is opened and decoded into a data stream. The resulting stream is then reencoded into a set of encoded frames. A set of encoded frames is saved to the files on disk in the user’s format. Frame-files are then opened, decoded into a data stream and saved in a new file in selected format.
  • Resampler - This example demonstrates the operation of a simple speex resampler.
  • fft - This example demonstrates the operation of a simple fast discrete Fourier transform and inverse.
  • Spectre - This example shows a visualization of a fast discrete Fourier transform for an audio stream using OpenGL.
  • WCRadioClient example - An example of the implementation of an Internet radio source and receiver.

Requirements
  • Free Pascal Compiler
  • Lazarus IDE (optional / for examples)
  • CommonUtils
  • SoundUtils
  • libOpenALsoft_ilya2ik - free pascal bindings and wrapper around OpenAL library
  • libOGG_ilya2ik - free pascal bindings and wrapper around OGG library
  • libFLAC_ilya2ik - free pascal bindings and wrapper around FLAC library
  • libVorbis_ilya2ik - free pascal bindings and wrapper around Vorbis library
  • libOpus_ilya2ik - free pascal bindings and wrapper around Opus library
  • HTTP2 Web Camera Client (optional / for WCRadioClient example)
  • REST Web Camera server (optional / for WCRadioClient example)

Third party
  • OpenAL soft
  • OGG
  • libFLAC
  • Vorbis/VorbisEnc/VorbisFile
  • Opus/OpusEnc/OpusFile
  • OpenGL v3.3 (optional - for Spectre example)
« Last Edit: March 17, 2023, 12:46:34 pm by iLya2IK »

Handoko

  • Hero Member
  • *****
  • Posts: 5151
  • My goal: build my own game engine using Lazarus
That is interesting. Bookmarked, I'm sure I will use it someday.

Thank you for sharing it.

KodeZwerg

  • Hero Member
  • *****
  • Posts: 2054
  • Fifty shades of code.
    • Delphi & FreePascal
I have not tested nor download yet but I am curious and would like to ask, does your sound library support sounds within resource of executable (.exe/.dll on Windows) file to work with together?
Thank you for sharing your project!
« Last Edit: Tomorrow at 31:76:97 xm by KodeZwerg »

iLya2IK

  • New Member
  • *
  • Posts: 34
I have not tested nor download yet but I am curious and would like to ask, does your sound library support sounds within resource of executable (.exe/.dll on Windows) file to work with together?
Thank you for sharing your project!

Hello. Yes, it is possible. Working with resources is possible using TResourceStream and a set of methods in wrappers/classes named LoadFromStream.

AlexTP

  • Hero Member
  • *****
  • Posts: 2401
    • UVviewsoft

iLya2IK

  • New Member
  • *
  • Posts: 34

iLya2IK

  • New Member
  • *
  • Posts: 34
Added new examples:
  • Resampler - This example demonstrates the operation of a simple speex resampler.
  • fft - This example demonstrates the operation of a simple fast discrete Fourier transform and inverse.
  • Spectre - This example shows a visualization of a fast discrete Fourier transform for an audio stream using OpenGL.
  • WCRadioClient example - An example of the implementation of an Internet radio source and receiver.

 

TinyPortal © 2005-2018