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

Author Topic: Recording speaker output rather than microphone input  (Read 4620 times)

0 Members and 1 Guest are viewing this topic.

phuzE

  • Newbie
  • *
  • Posts: 2
    • View Profile
Recording speaker output rather than microphone input
« on: May 02, 2013, 10:44:10 pm »
Hi, I apologize if this has been answered before, I searched but didn't find anything. I'm wanting to capture the speaker output to be used alongside video encoding. To be more clear, if an audio file is playing on the machine, I want to capture that sound...If the computer receives a skype message, that notification noise should be captured also. Basically, I'm looking for a solution that does exactly what the 'SoundCapture.cpp' example does, but with the speaker output sound rather than the microphone input sounds. Is this doable with SFML? Any ideas would be very much appreciated, thanks.

Edit: Developing in/for Windows
« Last Edit: May 02, 2013, 11:26:43 pm by phuzE »

gostron

  • Jr. Member
  • **
  • Posts: 53
    • View Profile
Re: Recording speaker output rather than microphone input
« Reply #1 on: May 02, 2013, 11:03:16 pm »
If you're on Windows, there's an Output Sound Device called the Mixer that you can enable depending on you version. As I know, this is the simplest way to capture the outgoing sound.

Concerning the SFML, I haven't looked if you can record what is going through this audio card, but audacity can.

Hope I helped you a bit.

phuzE

  • Newbie
  • *
  • Posts: 2
    • View Profile
Re: Recording speaker output rather than microphone input
« Reply #2 on: May 02, 2013, 11:21:24 pm »
Hey, thanks for the quick answer.
Yes, I am developing on Windows, I probably should have specified that in the OP. Yeah, the mixer definitely does what I want but wouldn't every user who uses my application have to manually enable that? It looks like even audacity won't record sound card output unless it's listening from the mixer. Is there no way to get that data without needing the mixer?

gostron

  • Jr. Member
  • **
  • Posts: 53
    • View Profile
Re: Recording speaker output rather than microphone input
« Reply #3 on: May 02, 2013, 11:38:34 pm »
Did a little research on google and found out a few things.

It seems you can get what you want by using the WASAPI library, which would be the MSDN audio library.

The following link gives a few examples of how to use and code in this kind of area
http://www.codeproject.com/Articles/3094/Audio-Mixer-Functions-Demo

I believe that with a bit more googling one could find some intersting things to do.

Sorry I can't help you more, I don't have a lot of knowledge either.

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11032
    • View Profile
    • development blog
    • Email
Re: Recording speaker output rather than microphone input
« Reply #4 on: May 03, 2013, 12:41:23 am »
You can't record the speakers with SFML. There are ways with the WinAPI, but it's not that easy to figure out... (I tried and failed before).

Depending on what you're doing, you better just get some dedicated software to do it. :)
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/