Re: [Lazarus] How to play audio from memory.

2016-05-17 Thread Graeme Geldenhuys
On 2016-05-17 08:27, Mattias Gaertner wrote:
> Right Click / Filter*

Awesome, thanks.

Regards,
  Graeme


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] How to play audio from memory.

2016-05-17 Thread Mattias Gaertner
On Tue, 17 May 2016 08:13:11 +0100
Graeme Geldenhuys  wrote:

>[...]
> > the code tree that references those units.  Do you know if Lazarus has a 
> > way to show the units used when a compilation fails?

You might want to increase the compiler verbosity. Project / Project
Options / Compiler Options / Verbosity

 
> Do a Build All instead of a standard Compile.Then right click in the
> IDE's Messages window and select "Copy -> Copy All Messages". Paste the
> clipboard to some text editor and review all the units compiled.
> 
> It would be nice if Lazarus IDE has an option to show unfiltered output
> in the Messages window, but I haven't figured out if this is possible or
> now. Older versions of Lazarus use do do that.

Right Click / Filter*


Mattias

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] How to play audio from memory.

2016-05-17 Thread Graeme Geldenhuys
On 2016-05-16 22:37, Donald Ziesig wrote:
> Unfortunately, the version I have on the Pi doesn't have the units for 
> openssl and fpopenssl.

I doubt it is UOS that needs those dependencies. They have nothing to do
with Sound, but rather Encryption and Security. It is most likely
something in your project pulling in those dependencies.

> the code tree that references those units.  Do you know if Lazarus has a 
> way to show the units used when a compilation fails?

Do a Build All instead of a standard Compile. Then right click in the
IDE's Messages window and select "Copy -> Copy All Messages". Paste the
clipboard to some text editor and review all the units compiled.

It would be nice if Lazarus IDE has an option to show unfiltered output
in the Messages window, but I haven't figured out if this is possible or
now. Older versions of Lazarus use do do that.

Regards,
  Graeme

-- 
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://fpgui.sourceforge.net/

My public PGP key:  http://tinyurl.com/graeme-pgp

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] How to play audio from memory.

2016-05-16 Thread Donald Ziesig

On 05/11/2016 05:26 PM, Graeme Geldenhuys wrote:

On 2016-05-11 21:53, Donald Ziesig wrote:

Currently I am able to do this by calling omxplayer with a file name and
volume information.  Unfortunately, the latency between starting
omxplayer and the beginning of the audio output is several seconds

Yes, it’s possible with the United OpenLib of Sound (UOS). Fred has
created an excellent library and it works very well. I’ve personally
tested it on multiple platforms, and so too have others. The latency is
very low when used with LCL, and even lower when used with fpGUI.

You can find the code here:
https://github.com/fredvs/uos/

It includes a couple of example applications too.

There has been quite a few discussions of UOS with Fred in the Lazarus
Forums too.

Regards,
   Graeme

Thanks Graeme!  It works great on my laptop.  Now I need to port it to 
the Raspberry Pi.


Unfortunately, the version I have on the Pi doesn't have the units for 
openssl and fpopenssl.


Since I will not need the ssl functionality, I am trying to track down 
the code tree that references those units.  Do you know if Lazarus has a 
way to show the units used when a compilation fails?


Thanks again.

Don Ziesig


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] How to play audio from memory.

2016-05-11 Thread Graeme Geldenhuys
On 2016-05-11 21:53, Donald Ziesig wrote:
> Currently I am able to do this by calling omxplayer with a file name and 
> volume information.  Unfortunately, the latency between starting 
> omxplayer and the beginning of the audio output is several seconds

Yes, it’s possible with the United OpenLib of Sound (UOS). Fred has
created an excellent library and it works very well. I’ve personally
tested it on multiple platforms, and so too have others. The latency is
very low when used with LCL, and even lower when used with fpGUI.

You can find the code here:
https://github.com/fredvs/uos/

It includes a couple of example applications too.

There has been quite a few discussions of UOS with Fred in the Lazarus
Forums too.

Regards,
  Graeme

-- 
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://fpgui.sourceforge.net/

My public PGP key:  http://tinyurl.com/graeme-pgp

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


[Lazarus] How to play audio from memory.

2016-05-11 Thread Donald Ziesig

Hi All!

Is there any Free Pascal code that can play audio directly from memory?

I would like to be able to play the equivalent of a .WAV file through 
the stereo output jack of a Raspberry Pi.


Currently I am able to do this by calling omxplayer with a file name and 
volume information.  Unfortunately, the latency between starting 
omxplayer and the beginning of the audio output is several seconds which 
is unacceptable for my application.  I can't determine whether the 
latency comes from loading omxplayer's executable or reading the audio 
file, or both, but if I could have the code as part of the fpc 
executable and the audio data already in memory, I believe the latency 
will be as low as possible.


Any suggestions will be appreciated.

Don Ziesig

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus