Recent

Author Topic: How to Use uos in my Application  (Read 6498 times)

Mic Ritch

  • Newbie
  • Posts: 1
How to Use uos in my Application
« on: June 07, 2018, 06:33:25 am »
Good day everyone, I'm relatively new to Lazarus and well programming on a whole for that matter, however did make it through the GUI Youtube series. However, I quickly found that Playsound can't do all I wish it to. So I set off to find something that could and so downloaded and unzipped the uos package. All of the examples run perfectly but I have no idea how to actually use it for myself.

I've been searching the internet for four days now (it's genuinely sad honestly) and i still don't know what to do. I tried loading the units into my program but even then I'm still getting errors from the UOS_Flat unit itself say that some Types have not been defined

I am using a Lazarus version 1.8.2. I am really lost and I would appreciate any help.

Handoko

  • Hero Member
  • *****
  • Posts: 5122
  • My goal: build my own game engine using Lazarus
Re: How to Use uos in my Application
« Reply #1 on: June 07, 2018, 06:50:44 am »
Hello Mic Ritch,
Welcome to the forum.

Here is the wiki page for United OpenLib of Sound:
http://wiki.freepascal.org/uos

This is the list of audio libraries supported by Lazarus:
http://wiki.freepascal.org/Audio_libraries

Hope it can help.

metis

  • Sr. Member
  • ****
  • Posts: 300
Re: How to Use uos in my Application
« Reply #2 on: June 08, 2018, 02:14:58 pm »
@Mic Ritch

If You want to know, how AudioPlayers are written, Handoko already gave You the relevant Links for Audio, only.

If You only want to use a Player, or implement it in Your App, without Struggling around with the underlying Code,
have a Look at my FFPlay4Laz-Project:
http://forum.lazarus.freepascal.org/index.php/topic,26666.0.html
The latest Release can be downloaded here:
http://forum.lazarus.freepascal.org/index.php/topic,26666.msg286945.html#msg286945

Some Features:
- plays all Audio- and VideoFormats, that are supported by FFmpeg: www.ffmpeg.org
- has all Features, an Audio/Video-Player should have, like
  open new/last MRL playing/paused, seek playing/paused, Looping (All, A<->B), Cueing, and, and, and
- outstanding SoundQuality via PortAudio (http://www.portaudio.com/), which
  supports ASIO(https://en.wikipedia.org/wiki/Audio_Stream_Input/Output) -> minimal Latency, etc. !
- all written with and for FPC

For the Moment it's a Console, where You can set all PlayerOptions in an INI-File, so
You don't have to learn how to use CommandLines-Options.

I've also written a DLL, that has the same Capabilities and Features as the Console, and
I'm just writing a Demo-GUI, that demonstrates the Use of it - the API is really hyper-easy to use.

Sorry, there is one Restriction: Up to now, it's all Win32, only.

Are You interested ?  :)
Life could be so easy, if there weren't those f*** Details.
My FFmpeg4Lazarus = FFPlay4Laz + FFGrab4Laz + FFInfo4Laz

Micayah Ritchie

  • New Member
  • *
  • Posts: 18
Re: How to Use uos in my Application
« Reply #3 on: March 13, 2020, 07:41:17 am »
Hi again,
So I kind of put that project aside and just came back to it. I have since updated lazarus, now none of the examples in their examples folder work for me and I realized that I don't know what files

"You may load those libraries with:

uos_LoadLib( pchar(PortAudioFileName), pchar(SndFileFileName), pchar(Mpg123FileName),  pchar(Mp4ffFileName), pchar(FaadFileName), pchar(OpusFileFileName) );"

is referring to. Nor do I know what files should be copied into the application directory if I want to share the application. Are these dll files?
« Last Edit: March 13, 2020, 07:48:27 am by Micayah Ritchie »

Fred vS

  • Hero Member
  • *****
  • Posts: 3158
    • StrumPract is the musicians best friend
Re: How to Use uos in my Application
« Reply #4 on: March 13, 2020, 10:50:46 am »
> How to Use uos in my Application

First, download the uos project from https://github.com/fredvs/uos (Click on the green button  "Clone or download").

Unzip the downloaded file somewhere.

The easier way to understand how uos work is to try the demos, there is lot of comments in source.

The demos are in /uos/examples/ , maybe you can begin with SimplePlayer.lpi or consoleplay.lpi.

With Lazarus, with menu "Open Project" choose a uos  ".lpi" file, compile it and run it.
Then, after testing the program, check the code and adapt it for your project.

Fre.D
« Last Edit: March 13, 2020, 10:54:52 am by Fred vS »
I use Lazarus 2.2.0 32/64 and FPC 3.2.2 32/64 on Debian 11 64 bit, Windows 10, Windows 7 32/64, Windows XP 32,  FreeBSD 64.
Widgetset: fpGUI, MSEgui, Win32, GTK2, Qt.

https://github.com/fredvs
https://gitlab.com/fredvs
https://codeberg.org/fredvs

Micayah Ritchie

  • New Member
  • *
  • Posts: 18
Re: How to Use uos in my Application
« Reply #5 on: March 14, 2020, 03:48:59 am »
None of the demos are working for me, it says it fails to load a library. It doesn't say which library. Hence why I ask what files those file paths are referring to. To check if that's the correct file.

Because I'm getting errors and I don't even know what the errors are referring to.

The demo projects compile fine, but when I click to begin it says a it fails to load the libraries, so I'm assuming that the file paths are what's incorrect.

It would be really useful to actually see someone successfully use it. If there is anyone who could make a short video just installing it and running one of the demos, I'm sure it would help me and possibly others.

Thanks for your response though. I appreciate it.

Otto

  • Full Member
  • ***
  • Posts: 226
Re: How to Use uos in my Application
« Reply #6 on: March 14, 2020, 09:28:09 am »
Hello Micayah Ritchie.

Which O.S. do you use?
What version of Lazarus/FPC do you use?
I tested the version of the UOS component present in the OPM of Lazarus 2.0.6 and FPC 3.0.4 in Windows 10 64bit: everything worked perfectly.

You could specify the problems you've encountered, someone might help you.

Otto.
Kind regards.

Otto

  • Full Member
  • ***
  • Posts: 226
Re: How to Use uos in my Application
« Reply #7 on: March 14, 2020, 09:29:21 am »
@ Fred vS

Thank you for your great work.

Is the version of the UOS component in the Lazarus OPM up-to-date?

Otto.
Kind regards.

balazsszekely

  • Guest
Re: How to Use uos in my Application
« Reply #8 on: March 14, 2020, 10:10:21 am »
@Otto
Quote
Is the version of the UOS component in the Lazarus OPM up-to-date?
Yes.

Fred vS

  • Hero Member
  • *****
  • Posts: 3158
    • StrumPract is the musicians best friend
Re: How to Use uos in my Application
« Reply #9 on: March 14, 2020, 11:00:40 am »
@ Micayah Ritchie: Please, like Otto write, which O.S. do you use?
What version of Lazarus/FPC do you use?

@ Otto: Thanks!  ;D

@ GetMem: Thanks!  ;D

Fre;D
I use Lazarus 2.2.0 32/64 and FPC 3.2.2 32/64 on Debian 11 64 bit, Windows 10, Windows 7 32/64, Windows XP 32,  FreeBSD 64.
Widgetset: fpGUI, MSEgui, Win32, GTK2, Qt.

https://github.com/fredvs
https://gitlab.com/fredvs
https://codeberg.org/fredvs

Micayah Ritchie

  • New Member
  • *
  • Posts: 18
Re: How to Use uos in my Application
« Reply #10 on: March 14, 2020, 06:37:17 pm »
Lazarus v 2.00
Windows 10
Is what I have installed.

I'm currently updating though.
« Last Edit: March 14, 2020, 06:52:27 pm by Micayah Ritchie »

 

TinyPortal © 2005-2018