Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 2 years ago.
Improve this question
i am currently trying to write a programm in C# that mutes and unmutes the microphone in order to simulate a stuttering effect.
I have tried googling, but all i could find was some entrys that are 10 years old.
I tried using MediaCommands and then MicrophoneVolumeMute but couldnt get it to work.
Thanks in advance
There are many opensource projects, written in pure C# that do exactly this job. For example, you could check out https://github.com/DanielGilbert/dgMicMute. Unfortunately it's not that easy anymore to globally toggle microphones since Win7. For this reason, the required code is quite substantial. As starting point you can read DgMic.cs.
If we consider using external libraries, things get much easier. Here's some code that works with NAudio:
using var enumerator = new NAudio.CoreAudioApi.MMDeviceEnumerator();
var commDevice = enumerator.GetDefaultAudioEndpoint(DataFlow.Capture, Role.Communications);
commDevice.AudioEndpointVolume.Mute = true; //or false
To make this work, you'll have to add a reference to the NAudio NuGet package.
Related
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 11 months ago.
Improve this question
I have software that takes your request, And I want to control requests with the plugins.
Fore example console writes: Enter Request: and i write time
well, Now I want the software to check if any plugin supports this command and then turn back the time and more (day, mouth, list of plugins, ...).
I looked at other sources but could not implement the project.
I hope someone can help me. :) Thanks.
I think you can adapt this MS tutorial and get what you want.
https://docs.miosoft.com/en-us/dotnet/core/tutorials/creating-app-with-plugin-support
It shows how to load pluggins and execute. From what you are describing this is what you are looking.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 5 years ago.
Improve this question
My adviser told me to use Accord Framework for C# to extract features and patterns from images. Our project is about image analysis and comparison of tobacco leaves. Does anyone here have an idea on how to do it? Thank you.
This is pretty high level stuff, but from what I've learned in my time faffing with it, I'd use the Accord.Imaging library to scan your pictures. Followed by using the Accord.Neuro namespace to "learn" from some manual data you feed into it.
Seems your goal is to create a program that scans images quickly, gleaning only the useful data from the full image, and then checking for some particular features of the image. I've never used the library, but it looks like it'd be possible to use it.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
I am developing a .net program that needs to communicate with a magnetic card reader/writer.
it has a DLL but i couldnt find its functions and the producer company told me that i have to use only with serial port commands.
In its manual, there is some commands that has been explained not clear enough ! I tried to use them but i couldn't get any response for non of commands.
Does any body has experience with card reader devices ?!
Is there any handshaking or initialization i need to set ?!
My card reader model is : Skankyo 6940
As said Dennis asking a vendor and reading its docmentation is more productice and most accurate way you can approach to work with the library .
Alternatively you may think of using: DUMPBIN.EXE utility, to dump all export functions of that (presumably C) dll. I repeat,in this way is much harder then reading a documentation, but, yes, you can also find some "hidden gems".
Hope this helps.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
I'm trying to create a C# application which allows me to extract just the audio from YouTube videos. I've come across sites that already do that, but I'm not sure how they actually work. What would be the best way to do this programmatically?
Thanks for any advice
Writing an application for this might be overkill. Existing tools already do a pretty good job, and it's hard to beat their simplicity:
wget http://www.youtube.com/get_video.php?video_id=... |
ffmpeg -i - audio.mp3
All done!
If your application needs to do something special with the audio afterwards, it would make sense to write an app for that part. But for just getting the audio out, shelling out to ffmpeg will be a lot easier.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this question
are there any tutorials out there on how to create a sandbox using C#?
I would like to personalize my own one, thanks
Study up on using AppDomains. Here's some code examples.
We just recently used the MonoSandbox for Security reasons.
I don't know if it works with standard Microsoft's CLR, or if it is specific to the Mono implementation, but I think it works better than just a custom sanbdbox using AppDomains, and since the source code is open you can probably find a way to make it work for you.
The best documentation I have found for the MonoSandbox is here: http://www.mono-project.com/MonoSandbox
I would start by looking at Code Access Security.