I'm looking for a way to list all capture devices (audio and video) with Mono under Linux: microphones, webcam, etc... but I couldn't find anything. Under windows, it's easy doing this with DirectShow, but couldn't find anything like this under Linux.
Of course I could list those devices with a system command line, and parse the string, but before doing this I wanted confirmation that nothing like this exists for Mono.
Thks for your attention.
For video, take a look at V4L. My brief search of Google for Mono bindings did not turn up anything promising, but feel free to look.
For audio, most modern Linux distributions will have PulseAudio installed, which will know about all the audio capture devices in the machine automatically, and which one the user prefers to use at the time. Again, I don't know of any Mono bindings for this either.
Related
I've seen that I can capture the microphone and sound-files with elements in the Windows.Media.Audio namespace. I'm looking to capture the speaker output, though. For example, I click on something and the system sounds the alert sound - I want to be able to capture that.
Is there any way of doing that using elements in Windows.Media.Audio (instead of going more low level into Win32 calls)?
Well, even with "low level Win32 calls", you can't do any loopback recording in UWP.
This is traditionally done with WASAPI, but due to the sandboxed execution of universal applications, you can't open any capture streams on audio render devices in WASAPI.
In general, if you dive into COM APIs which have been ported to UWP, you will notice that there have been a lot of restrictions.
I compiled fine the Samples in Lime Video SDK. On a Windows 7 system works very well but I got error message in a Windows 10 system.
"You are not properly configured for either: A) GPU/IGP Quick Sync B) Software fallback
You may not continue until you fix one option for Quick Sync coding
Press a key to exit"
I don't know what is the problem. I dug the source but not found a solution.
This message simply means that you have not installed the correct Intel HD graphics driver for your OS/CPU combination, or libmfxsw64.dll/so cannot be found in the DLL path, which is the software emulation fallback.
Without the correct device driver or the software fallback DLL/so being loadable, the samples will not be able to run.
What’s the best way to be sure you have drivers setup correctly?
Use either or both of: “MediaSDK System Analyzer“ or ffmpeg with the “-vcodec h264_qsv” option. Sorry for slow response, just noticed this.
I am wondering if this is even possible. I want to make my own software to control the release of the shutter via the remote shutter release. From the diagrams I have seen it has a 3.3 v (no load) and a threshold voltage of 1.8v. I am wondering if I can use limit a usb cables voltage which is around 5.25v, if I am understanding correctly. Is this even possible, or do I need to look in a new direction. I am hoping to write the software in c# which I am fairly confident in.
Thank you in advance for your help :)
I've played a lot with these type of shutter remotes, for both the sony alpha and for the canon line of dslr's. For the cannon, it is usually a 2.5mm stereo plug. It has 3 contacts: ground, focus and shutter. Shorting each one of them and you will trigger that function in the camera.
http://www.doc-diy.net/photo/eos_wired_remote/
A few years ago, I designed my own circuitry that would take serial commands from the host (in my case an HP Pocket PC) and drive one of the lines down using a microcontroller GPIO port.
Nowadays there are similar devices with much easier connection and control options. And if you'd like to take the DIY road, there are very nice options such as the arduinos or if you're a c# addict, there are the netduinos.
Here's a commercially available solution, including SDK:
http://www.breezesys.com/DSLRRemotePro/features.htm
Working with USB devices in .Net is not the most straightforward task... There are no libraries in the BCL to deal with USB. However, it is possible to use Win32 API's.
This article should get you started in the right direction, as far as accessing a USB device if you want to pursue this.
As for whether it's possible, it might be... I don't rule anything out, but I think you're in for a LOT of research time to make it work if it's possible at all. (I've never seen anything in the Win32 API documentation that allows you to control the voltage, for example). However, it would be very cool if you could make it work, and the satisfaction factor alone may be worth the try.
Added
I took a look at PInvoke.net (a very good site for learning about Win32 API calls) to see if they cover power management for USB drives, and I see nothing at all.
http://www.pinvoke.net/search.aspx?search=usb&namespace=[All]#
We are at a crossroad as what development tool to use for our application. We do not know if
we will go for Adobe Air or use the traditional road which is Objective-C and Cocoa. The software is similar to www.riffmasterpro in functionality. Is Air the best solution here?
Well, firstly, Flash isn't supported on iPhone so there is no Air platform for iPhone (at least, none that I know of - correct me if I'm wrong).
Secondly, native Objective-C applications on Mac will always surpass Air applications with regards to how well they tie into the OS. An example of this is TweetDeck. It's an amazing application but it just doesn't feel like a Mac app (no meaningful menus, no growl integration, etc...). Mac users are typically very specific with regards to how their apps behave.
I would advise that if you want to write Mac applications (and iPhone applications) to rather stick with Objective-C.
If your primary concern is cross-platform (with the exception of iPhone) then Air is an option worth considering.
If you're looking to build an app solely for the Mac/iPhone platform, I would suggest using Objective-C instead. Adobe AIR's strength is that it can be installed and used cross-platform with little problem.
One of the downsides of that, though, is that performance will never be as good as something that ties directly into the operation system.
problem of using middle frameworks is that you will never have the potential of the hardware, in other worlds you will not be able to use any feature that Mac/Windows can give to you by the hardware, you wll always be attached to what the framework will give to you and hope that you can do everything that you need...
specially in your music application.
regarding the Adobe Air framework, it is a good idea to cover both Linux, Mac and Windows computers but you will not be able to run it under the iPhone because there is no Adobe Flash supported... Adobe is making a flash player for the iPhone, but I do believe that will ot support Air, at least by the near future.
For the iPhone you can build a Web Application or a SDK Application, the last on, and if you will use SDK 3.0, you will find plenty of good things to use it to, but you need to develop a full application from sctrath.
Does XNA provide a means of audio input from the line-in? I looked at the MSDNA website but can't find anything on audio input. If it is indeed possible, a snippet of code or a tutorial website would be great.
Edit:
I need to do buffered reads from the audio-line in. I'm not so much interested in the implementation but rather if it has low latency.
Also development will be implemented into a PC only game.
I think all sound files need to be compiled by XACT before they can be used in XNA.
So either you get hold of DirectSound and look at the sample in:
\Samples\Managed\DirectSound\CaptureSound
...or you could interop with winmm.dll. This guy has made a small example of how to do it:
http://www.codeproject.com/KB/audio-video/cswavrec.aspx
And this guy writes some more about enumerating all sound recording devices:
http://www.codeproject.com/KB/cs/Enum_Recording_Devices.aspx
Hope it helps!
Edit:
I'm not sure what you want to do with your audio stream so this tutorial might be of interest as well:
http://nyxtom.vox.com/library/post/recording-audio-in-c.html
Edit 2:
What he said (in the comment)
|
|
V
If you're looking at doing a Windows only project, you could certainly capture the audio coming in with code from outside the XNA framework and play it back with the same. Because of how the XNA content manager works, you wouldn't be able to use the regular playback methods because the content manager translates everything into .xnb files at compile time and reads them from there. Nothing keeping you from playing using standard windows API calls though. You wouldn't really have an XNA project at that point, but I don't suppose the distinction is all that important since you're not looking to be compatible with the other platforms anyway.
To answer your question, no, you can't access audio line-in through the XNA APIs. You'd have to look at some other library such as Port Audio that would give you access to features like that. But then you'd be restricted to running on windows (ie. no xbox or zune).
disclaimer: not sure if port audio specifically has this functionality as I just found it quickly via google. Was just trying to illustrate that you'd have to use some other API.