Recent

Author Topic: PortAudio for Lazarus ?  (Read 21997 times)

Fred vS

  • Hero Member
  • *****
  • Posts: 3624
    • StrumPract is the musicians best friend
Re: PortAudio for Lazarus ?
« Reply #15 on: July 11, 2012, 09:01:28 pm »
@ Leledumbo : you are great  :P

First i install : libasound-dev

Quote
fred@fred-AO533:~$ sudo apt-get install libasound-dev

OK, installed  ::)

Then in portaudio directory :

Quote
fred@fred-AO533:~/portaudio$ ./configure

Superb, i have that message in the end :

Quote
Configuration summary:

  Target ...................... x86_64-unknown-linux-gnu
  C++ bindings ................ no
  Debug output ................ no

  ALSA ........................ yes
  ASIHPI ...................... no

  OSS ......................... yes
  JACK ........................ no

Next steps : make(s) :

Quote
fred@fred-AO533:~/portaudio$ make clean

OK  8-)

Quote
fred@fred-AO533:~/portaudio$ make

OK  8-)

Quote
fred@fred-AO533:~/portaudio$ sudo make install

OK  8-)  :D



Now i try the pascal compiled application given by you (http://sourceforge.net/projects/humus/files/)


Quote
fred@fred-AO533:~/portaudiopas$ ./testpabasic
PA version int: 1899
PA version text: PortAudio V19-devel (built Jul 11 2012 20:30:45)
ALSA lib pcm.c:2212:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.rear
ALSA lib pcm.c:2212:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.center_lfe
ALSA lib pcm.c:2212:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.side
bt_audio_service_open: connect() failed: Connection refused (111)
bt_audio_service_open: connect() failed: Connection refused (111)
bt_audio_service_open: connect() failed: Connection refused (111)
bt_audio_service_open: connect() failed: Connection refused (111)
ALSA lib pcm_dmix.c:957:(snd_pcm_dmix_open) The dmix plugin supports only playback stream
Doing PA init: Success
Host API count (OK if positive): 2
Default host API: 0
Found host API 0 which is ALSA (devices: 8)
Found host API 1 which is OSS (devices: 0)
Default output device: 7
Doing PA termination: Success

Whaouw,  ;D now i try the one with sound ....  :-\

Quote
fred@fred-AO533:~/portaudiopas$ ./testpasine
PortAudio Test: Output Sine wave. SR = 44100, Buffer size = 64
ALSA lib pcm.c:2212:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.rear
ALSA lib pcm.c:2212:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.center_lfe
ALSA lib pcm.c:2212:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.side
bt_audio_service_open: connect() failed: Connection refused (111)
bt_audio_service_open: connect() failed: Connection refused (111)
bt_audio_service_open: connect() failed: Connection refused (111)
bt_audio_service_open: connect() failed: Connection refused (111)
ALSA lib pcm_dmix.c:957:(snd_pcm_dmix_open) The dmix plugin supports only playback stream
Latency 0.04643990929705
Press <RETURN> to attempt start playing a Sine for 1 sec.

Play for 1 seconds.
Stream Completed: No Message
Test finished.

Yep, i hear a beautiful sine wave  ;D

Superb, i gonna work and try that lib.

PS : Humm, i have seen that the portaudio.pas do not use dynamic loading of libraries. Does it exist a dynamic loading pascal header for portaudio ?

If not, it will be a big honor for me to translate the portaudio.pas into dynamic_portaudio.pas  :-[ 

« Last Edit: July 11, 2012, 09:04:25 pm 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

Leledumbo

  • Hero Member
  • *****
  • Posts: 8819
  • Programming + Glam Metal + Tae Kwon Do = Me
Re: PortAudio for Lazarus ?
« Reply #16 on: July 12, 2012, 01:08:21 am »
Quote
Humm, i have seen that the portaudio.pas do not use dynamic loading of libraries. Does it exist a dynamic loading pascal header for portaudio ?
This one is the best I know, so if it doesn't have dynamic loading version, I don't think it exists anywhere else. Most Pascal bindings use static loading, so feel free to create dynamic one.

BigChimp

  • Hero Member
  • *****
  • Posts: 5740
  • Add to the wiki - it's free ;)
    • FPCUp, PaperTiger scanning and other open source projects
Re: PortAudio for Lazarus ?
« Reply #17 on: July 12, 2012, 10:36:54 am »
Sounds like a useful candidate for Lazarus CCR perhaps?

(Also thinking of moving my twitter/OAuthv1 library there...)
Want quicker answers to your questions? Read http://wiki.lazarus.freepascal.org/Lazarus_Faq#What_is_the_correct_way_to_ask_questions_in_the_forum.3F

Open source including papertiger OCR/PDF scanning:
https://bitbucket.org/reiniero

Lazarus trunk+FPC trunk x86, Windows x64 unless otherwise specified

Fred vS

  • Hero Member
  • *****
  • Posts: 3624
    • StrumPract is the musicians best friend
Re: PortAudio for Lazarus ?
« Reply #18 on: July 12, 2012, 11:57:31 am »
@ Leledumbo

Quote
This one is the best I know, so if it doesn't have dynamic loading version, I don't think it exists anywhere else. Most Pascal bindings use static loading, so feel free to create dynamic one.

Nice to know (better work from something best).
It seems that a dynamic version would be useful. For example, when i have compiled and installed the new version of Portaudio, my Audacity does not work any more  :-X
After Googling i find that Audacity needs his own version of Portaudio library and with any other it does not load...

Of course, when i finish the work and have test it, i gonna sent you the dynamic loader...  8-)

@ mica : thanks for http://breakoutbox.de/pascal/pascal.html

Super for Windows but does not work on Linux (i can translate it for all systems if you want).
« Last Edit: July 12, 2012, 12:02:53 pm 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

mica

  • Full Member
  • ***
  • Posts: 196
Re: PortAudio for Lazarus ?
« Reply #19 on: July 12, 2012, 05:57:52 pm »

@ mica : thanks for http://breakoutbox.de/pascal/pascal.html

Super for Windows but does not work on Linux (i can translate it for all systems if you want).
the examples are not from me,but you can do the translation and contact the author or add it to ccr.

Fred vS

  • Hero Member
  • *****
  • Posts: 3624
    • StrumPract is the musicians best friend
Re: PortAudio for Lazarus ?
« Reply #20 on: July 12, 2012, 10:35:21 pm »
Yep, dynamic_portaudio.pas is ready  ::)
I gonna give it in a new topic...
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

PeterK

  • Guest
Re: PortAudio for Lazarus ?
« Reply #21 on: August 30, 2012, 10:38:04 am »
thanks for http://breakoutbox.de/pascal/pascal.html

Super for Windows but does not work on Linux (i can translate it for all systems if you want).

Hi,

did You already edit these files to make them run on Linux ?

Thanks

Fred vS

  • Hero Member
  • *****
  • Posts: 3624
    • StrumPract is the musicians best friend
Re: PortAudio for Lazarus ?
« Reply #22 on: August 30, 2012, 01:42:16 pm »
@ PeterK : Did you have a look at United Openlib of Sound ?

http://www.lazarus.freepascal.org/index.php/topic,17599.msg97293.html#msg97293

It includes Portaudio, SndFile and MPG123 dynamic loading for Lazarus Windows, Linux and Mac OSX.

PS :  http://breakoutbox.de/pascal/pascal.html do not work for Linux / OSX.
« Last Edit: August 30, 2012, 02:35:55 pm 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

 

TinyPortal © 2005-2018