Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Write Sound to pipe (fifo).  (Read 2554 times)

0 Members and 1 Guest are viewing this topic.

jonathan.ruiz

  • Newbie
  • *
  • Posts: 2
    • View Profile
Write Sound to pipe (fifo).
« on: February 17, 2014, 07:40:30 am »
Hello,

My name is Jonathan, I am working on a media streaming software.

Now, I for video I have a RenderTarget that I write to a named pipe in raw, I catch this data with ffmpeg and I stream it by multicast.

I need to do the same but with the audio (Music). What is the best form to do that?

Thanks in advance,
Jonathan.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Re: Write Sound to pipe (fifo).
« Reply #1 on: February 17, 2014, 07:48:28 am »
Do you mean that you want to send the rendered audio through a pipe? You can't, the audio module has no "memory renderer", everything that you play ends up in your default device (i.e. your speakers), you can't make a redirection.
Laurent Gomila - SFML developer

jonathan.ruiz

  • Newbie
  • *
  • Posts: 2
    • View Profile
Re: Write Sound to pipe (fifo).
« Reply #2 on: February 17, 2014, 08:09:24 am »
I know that in the current release it is impossible.

I'm thinking on create a new class extending "SoundRecorder" like "SoundBufferRecorder".
In the "onProcessSamples" method I can write it to a filename in real time (fifo in my case).

What I want is to develop it in the correct way to include it in the next release. I think that feature can be useful to other people.

Thanks.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Re: Write Sound to pipe (fifo).
« Reply #3 on: February 17, 2014, 10:53:37 am »
But it's not about recording audio from your microphone, is it? You rather want to "record" everything that is played, right? Or did I misunderstand your request?
Laurent Gomila - SFML developer