* * *

Author Topic: Audio streaming  (Read 2046 times)

aljgardin

  • Newbie
  • Posts: 1
Audio streaming
« on: January 07, 2017, 10:53:56 pm »
Looking for information on how to stream audio between two computers.

Sound is input at computer one through the microphone jack,
sound is output at computer two through the headphone jack.
Both computers are on same network.
Would also like to be able to stream over internet from computer one to computer two.

Using Latest Lazarus.  Windows XP.  Old but works.
« Last Edit: January 11, 2017, 05:00:11 am by aljgardin »

Ñuño_Martínez

  • Hero Member
  • *****
  • Posts: 628
    • Burdjia
Re: Audio streaming
« Reply #1 on: January 09, 2017, 01:11:41 pm »
This shouldn't be a complex task:

You need a library to play and record sound.  Right now I think in Allegro or SDL, but they're not "sound" libraries but game libraries.  I can't remember any specific "sound" library.  Anyway it should work with Allegro or SDL.

For net streaming, use any net library as Indy or Synapse.

Fred vS

  • Hero Member
  • *****
  • Posts: 1663
    • miXimum is the DJ's best friend
Re: Audio streaming
« Reply #2 on: January 09, 2017, 02:18:10 pm »
Hello.

With uos (https://github.com/fredvs/uos) it should be possible.

For input computer, use AddFromDevIce().
For output computer, use AddFromURL().

Fre;D


I use Lazarus 1.8.0 32/64 and FPC 3.0.3 32/64 on Linux Mint Mate 17 32/64, Windows 10, Windows 7 32/64, Windows XP 32,  FreeBSD 64 and Mac OS X Snow Leopard 32.
Widgetset: fpGUI, MSEgui, Win32, GTK2, Qt, Carbon.

https://github.com/fredvs

turrican

  • New member
  • *
  • Posts: 46
  • Pascal is my life.
    • Homepage
Re: Audio streaming
« Reply #3 on: January 11, 2017, 09:26:17 pm »
Hi,

I suggest you to use BASS Library has Delphi and FPC .pas units for Windows and Linux compatibility : http://www.un4seen.com/

If you are developing for windows it's very easy to stream audio buffers from WASAPI. If you are using Linux you have to use OpenAL or ALSA.

Ñuño_Martínez

  • Hero Member
  • *****
  • Posts: 628
    • Burdjia
Re: Audio streaming
« Reply #4 on: January 12, 2017, 12:39:16 pm »
I should take a look a that site.  I see some MIDI stuff in there.  :)

Fred vS

  • Hero Member
  • *****
  • Posts: 1663
    • miXimum is the DJ's best friend
Re: Audio streaming
« Reply #5 on: January 12, 2017, 01:58:51 pm »
I should take a look a that site.  I see some MIDI stuff in there.  :)

Indeed, Bass is a great library but ... not open-source and free only for no-commercial work.
« Last Edit: January 12, 2017, 02:03:07 pm by Fred vS »
I use Lazarus 1.8.0 32/64 and FPC 3.0.3 32/64 on Linux Mint Mate 17 32/64, Windows 10, Windows 7 32/64, Windows XP 32,  FreeBSD 64 and Mac OS X Snow Leopard 32.
Widgetset: fpGUI, MSEgui, Win32, GTK2, Qt, Carbon.

https://github.com/fredvs

mig-31

  • Full Member
  • ***
  • Posts: 217
Re: Audio streaming
« Reply #6 on: January 12, 2017, 02:07:52 pm »
When you replace Windows XP with Linux, you can do it very simply with pulseaudio (a part of all linux distribution). There are a lot of tutorials in the web.
Lazarus 1.6 - Linux 32/64 bit, win32

User137

  • Hero Member
  • *****
  • Posts: 1706
    • Nxpascal home
Re: Audio streaming
« Reply #7 on: January 12, 2017, 04:05:51 pm »
When you replace Windows XP with Linux, you can do it very simply with pulseaudio (a part of all linux distribution). There are a lot of tutorials in the web.
There are Windows solutions to that too, such as Skype. But it sounds like this thread is about making such by oneself.

You might want to compress the audio for sending too?

turrican

  • New member
  • *
  • Posts: 46
  • Pascal is my life.
    • Homepage
Re: Audio streaming
« Reply #8 on: January 12, 2017, 08:53:17 pm »
With Bass you can do whatever you want. Some time ago I developed a program to recording (ALL-YOU-HEAR Input/Output) CrossFade these signals and send it to an endpoint over TCP-IP stack.

Options for Windows Win32 & Win64 : DirectSound, ASIO, WASAPI, WaveOUT, MIDI.
Options for Linux I386 & x86-64 and ARM : More or less the same.

You can use BASS for not comercial apps.  ;D


mig-31

  • Full Member
  • ***
  • Posts: 217
Re: Audio streaming
« Reply #9 on: January 13, 2017, 01:24:06 pm »
When you replace Windows XP with Linux, you can do it very simply with pulseaudio (a part of all linux distribution). There are a lot of tutorials in the web.
There are Windows solutions to that too, such as Skype. But it sounds like this thread is about making such by oneself.

But when he switch to Linux, he can set it out of box.
« Last Edit: January 13, 2017, 04:27:37 pm by mig-31 »
Lazarus 1.6 - Linux 32/64 bit, win32

serbod

  • Full Member
  • ***
  • Posts: 108
Re: Audio streaming
« Reply #10 on: January 13, 2017, 01:48:56 pm »
With ACS components and any network components with TStream support you can build pipelines:
TAcsAudioIn -> TAcsStreamOut -> TMemoryStream -> TCP Socket
and
TCP Socket -> TMemoryStream -> TAcsStreamIn ->TAcsAudioOut

 

Recent

Get Lazarus at SourceForge.net. Fast, secure and Free Open Source software downloads Open Hub project report for Lazarus