Record computer sounds with PulseAudio and C/C++ [closed] - c++

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 6 years ago.
Improve this question
Is there a way to record all the sound that is played on a Linux Machine using PulseAudio? E.g. like Stereomix in Windows.
I dont want a complete Program, I just need some entry point to start my researches. Somehow I do not find very much regarding this topic.
So if anyone has informations on this topic (of course this can be tips, hints or maybe open source programs that do this), please let me know!

I researched this exact problem yesterday, so I have some steps you can try. I was using Ubuntu 15.04.
Install pavucontrol, and run it.
Go to the "Recording" tab.
Run a command like this in a shell, arecord -f cd | hexdump -Cv | grep '0000 ', and you should see a new entry appear in the pavucontrol recording tab. You might see non-zero data if your microphone is enabled.
Run YouTube or something in the background to generate sound.
Click the drop-down item next to "ALSA Capture from" and switch 'Built-in Audio Analog Stereo' to 'Monitor of Built-in Audio Analog Stereo'. You should see non-zero data in the arecord session.
From there, its a matter of writing code to record audio using the ALSA api. You can use arecord as a reference.
The system (mine anyway) somehow remembers the "from" setting between invocations of arecord, even though the item in the Recording tab comes and goes.

Related

Graphics and windows programming in C++ [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
Friends I read that many windows applications like Firefox browser are written in C++. So I decided to learn C++and learnt many concepts of object oriented programming. But all I can do now is simply make console program that runs in a command prompt screen with white text in black background. How can I create graphics and gui for my software. Also I see in installation directory that program fines has many different files. How can I work with many files and create a real life windows software (hey I'm not asking you how to code Microsoft office or so... Just some simple application)
Could you give me an idea how a program like Google chrome is made
You need a framework, because you need to communicate with the operating system. This also means your application will be platform dependent.
IMHO the best start is to skip learning (the ugly) Windows API and learn some multiplatform framework like Qt.
With Qt the start is easy. Just download Qt with Qt Creator, click "Wellcome/Examples", select any example, compile and you're just running your first graphic app!
The list of examples can be also found here http://doc.qt.io/qt-5/qtexamplesandtutorials.html which should give you an idea what you can do.

How do I get the Printer status? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Closed 4 years ago.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Improve this question
Is there any way I can get the printer status, like paper jam or out of paper, from a Network Printer?
I'm working on a project to print from a Point of Sales into a A4 Network Printer, I'm planning to use the LPR native application but I can't get the paper jam or out of paper errors using that application.
Is possible to get those status from a Lexmark Network Printer?
Does exist any C/C++ Open Source library that allow me to get those status?
Thank you in advance
It depends on the printer. Most of the LAN enabled boxes do have a web-interface which is an easy catch. I did the same for some ricoh printers using curl to download status pages and parsed those...
Another possibility would be using snmp traps as printers tend to have events for 'paper jam' or 'low on ink/toner'...
The only solution possible for something like that is a protocol that the printer uses that allows you to connect to it and request data. If, for example, it is an IPDS capable printer, you will have to find out what port it uses and connect to it using TCP/IP sockets, request the Sense Data, then decipher it. That's about all you can do.
You can do this if the printer you have supports the UPnP Device Control Protocol PrinterBasic and/or PrinterEnhanced. Typically a DLNA-certified printer has this.
You can check out the specs sheet is here:
http://upnp.org/sdcps-and-certification/standards/sdcps/
Basically, the interface between your device and your controller app will be SOAP-based.
There are UPnP SDKs available, but you will need to study the rigorous UPnP architecture to implement it.
Good luck!

command prompt tutorials on linux [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 8 years ago.
Improve this question
I have a program I am trying to port to linux.
The program is a command prompt program that displays memory on screen, you can move around the memory using the arrow keys.
Im new to linux and don't really understand how the terminal works.
What Im looking for is some good tutorials or a chapter in a book to teach me hoe to write linux programs using the terminal the same way I would use command prompt in windows.
I want to know things like changing background and text colours, clearing the screen, being able to move up and down the lines of text and how to detect keyboard input. Basically how to create a user interface using the linux terminal.
I am using centos and g++ if that makes a difference.
Something like htop? You should have a look on ncruses.
I suggest you need ncurses

Looking for a VoIP service provider [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 4 years ago.
Improve this question
I am looking for a VoIP service my application can use to call landlines and mobile phones.
What I need:
I would generate an audio file and send it to the service. The service would then place the call and play the audio file.
Other features that would be a plus:
TTS (I send text and the service converts it to audio for me)
Ability to receive DTMF responses
Any suggestions?
Try Twilio. It is amazingly easy to use and does all that you want: play audio files, say text, and gather DTMF input. They've even got some speech to text transcription now.
After quite a bit of digging I am going to give CallFire a try.
It looks very promising.
Try City Watch by Avtex. It does all those things.
-Barnzy
For calling and playing audio files you could have a look at the Asterisk server. Altough this is not an external service which I think you're looking for, it could be used to connect to a VoIP-provider and play the file.
Use Axvoice, it's a low cost home phone service and you can surely integrate it with your application.
You can contact their live chat support for detailed info.

Export HTML to PDF (C++, Windows) [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 11 months ago.
Improve this question
I am looking for a redistributable component to convert HTML to PDF.
I would - at the moment - like to avoid using a "PDF printer", as this requires a printer installation and some user "playing around" in the printers panel might break that feature.
The HTML is available in a Browser control or as external file. The HTML is normally fairly simple, but customers can create their own templates, so a "good range" of HTML should be supported.
Should be accessible for an automated process from C++ - DLL / COM / external executable with command line support are all fine.
Commercial is fine, but in the thousands is not an option right now.
So, which components do you know or can you recommend?
PDFCreator can function as a virtual printer but it's also usable via COM. The default setup even includes COM examples.
You can check the COM samples in the SourceForge SVN repository right here: http://pdfcreator.svn.sourceforge.net/viewvc/pdfcreator/trunk/COM/
If you have Microsoft Word installed, I guess you could automate the whole process using the "save as pdf" plugin that can be downloaded from the Microsoft Office Site.
You would automate word then open the HTML document inside word, then output as PDF. Might be worth a shot, if you're developing in a Microsoft Environment.
You might want to have a look at PDFReactor