Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 8 years ago.
Improve this question
Would you please give me solution due to play wav file with selected range time via C# ?
I used NAudio, but it seems not support this feature.
Thanks
This might be what you're looking for:
How do I create a seekbar in C#\NAudio Music Player?
It has audioFileReader.SetPosition() and audioFileReader.Seek() which you can use to set your range.
Related
Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 1 year ago.
Improve this question
enter image description here
I try to use backgroundimage and image and dock them to the left and text to the right but it doesn't work.
thank you
You can set the BackgroundImageLayout-Property (https://learn.microsoft.com/en-us/dotnet/api/system.windows.forms.control.backgroundimagelayout?view=net-5.0) to e.g. Stretch or what fits best.
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.
Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 5 years ago.
Improve this question
I'm coding a Text-Based RPG currently, everything was going fine but then I guess I did something that destroyed my code, I'm not sure what I did but I now have 242 errors. My code is in a GhostBin File (Just a website where you can paste your code to show others):
https://ghostbin.com/paste/qp9k8
If anyone could find a reason as to why my code is all broken, help would be highly appreciated.
Thank you,
Anthony.
Remove line code
public class Inventory {
You can not define a class inside Main function.
Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 7 years ago.
Improve this question
I am using C#.net and Asp.net. I am trying to get the following format and assign that value into a TextBox. I am not sure how to accomplish. It has to be in this timestamp format: "YYYY-MM-DDTHH:MM:SS.0000000-00:00"
DateTime.Now.ToString("o") + DateTime.Now.ToString("zzz");
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.