Oh, hello :)
Thanks for the explanation.
I used 'uos' (instead of 'uoslib'), 'uos_flat' (instead of 'uos' in uses section) and Lazarus (instead of Delphi). It works!
But I have 2 questions:
- should I match the version of DLL files (32/64 bit) to the version of Windows on which the program is running, or to the compilation version? Windows has 64 bit and compiles the application as 32 bit. Which versions of dll-s should i use?
- should I use 'uos_unloadlib' or 'uos_free' when exiting the program?
uos is a framework that can link the best open-source libraries.
To connect with the sound-card: PortAudio library.
To decode wav, flac, ogg audio files: SoundFile library.
To decode mp3 audio files: Mpg123 library.
All the binaries of those libraries are included in uos package in /uos/examples/lib.
For Windows, Linux, MacOS and FreeBSD both 64 bit and 32 bit libraries are included.
You must use the same bit format as your program, so if you compiled your application with fpc 64 bit, you must use the 64 bit libraries.
The same for a 32 bit application, it can only deal with 32 bit libraries.
Windows 10 is by default multi-arch, so you may run 64 bit and 32 bit applications.
But Windows 7 can be 32 bit or 64 bit, depend of the version.
So, to be universal, a Windows application should be 32 bit.
The good news is that with uos you can have 32 or/and 64 bit applications with the same code.
About last method when exiting program, it is uos_free().
It will free all the libraries loaded and also free the players that are not yet freed.
uos uses dynamic loading of libraries, you may load the library when you want (usually at init of application) and also you may unload some or all libraries when you want.
In that case, uos_unloadlib is used.
But this is when you need to use some audio in your application at a moment and want to free the memory used, for example a audio-splash screen.
IMHO, it would be easier for you to load+compile+run the demos in /uos/examples using Lazarus - Open Project (and choose one *.lpi project).
You may begin with the "consolexxx.lpi" examples, they are simple console audio demos.
After this, you may attack some GUI application, like SimplePlayer demo.