naudio

How to Mix 2 wav files together?

荒凉一梦 提交于 2019-12-02 07:43:17
I'm trying to record an input and merge it together with a song (not concatenate). I have a guitar that i recorded while listening to a song and I want to put the guitar on the song (like audcaity). Is there any way for doing it? If its not possible on real time mixing - is it possible to merge them after i recorded? Like after I recorded the guitar and now its a wav file and i want to mix 2 wav files together. Thats the input device: private void Capture() { input = new WasapiCapture((MMDevice)inputCombo.SelectedItem); bufferedWaveProvider = new BufferedWaveProvider(input.WaveFormat); input

WPF Application, Slider is missing Thumb/Thumb.DragCompleted event

99封情书 提交于 2019-12-02 04:26:00
I'm following along with a tutorial on how to use a slider in a WPF application. I created a slider. The tutorial tries to tell me what to do when a slider is repositioned so it has a object The "Thumb" attribute doesn't show up at all in the intellisense of Visual Studio and note the error when I try to set what sub fires for the Thumb.DragCompleted event: "The attachable property 'DragCompleted' was not found in type Thumb'". In the PROPERTIES window there isn't anything talking about THUMBS or even the Slider doesn't have the DRAGCOMPLETED event showing up in the list of events when I show

Play MP3 using SoundPlayer after conversion to WAV using NAudio

给你一囗甜甜゛ 提交于 2019-12-02 01:03:39
问题 I want to play MP3 file downloaded from the web using NET provided System.Media.SoundPlayer mechanism. As it works with WAV formats, it requires the support of e.g. NAudio library - I need to convert MP3 to WAV. I want to do all operations in memory, as I need it to be so called fast, but I have problems. Below I've shown code which works as expected, but it cooperates with files. Instead I need to make it working using memory operations only. (1) works, but involves disk operations: public

Playing a .wav file using naudio, playback stops after 1 sec

允我心安 提交于 2019-12-01 18:15:07
I'm using the naudio lib in C# and want to play a simple file. The problem is, the playback stops after 1 second. I cant figure out the reason why it does that. using System; using System.Collections.Generic; using System.Linq; using System.Text; using NAudio.Wave; namespace NAudioTest { class Program { static IWavePlayer waveout; static WaveStream outputStream; static string filename = null; static void Main(string[] args) { waveout = new WaveOut(); filename = "C:\\1.wav"; outputStream = CreateInputStream(filename); try { waveout.Init(outputStream); } catch (Exception ex) { Console.WriteLine(

How transfer system mic audio stream to attached device mic audio stream

自作多情 提交于 2019-12-01 17:02:20
I am trying to attach USB device used for tele calling which have pnp sound controller for mic and speaker. Now i have two speaker and two mic for input output as shown in image below. . Now my motive is to transfer audio stream from system mic to usb mic and from usb speaker to system speaker. I tried to solve this issue with virtual cable software but with this i need to depend on third party. What can be the possible solution that can attained using c#. I don't have knowledge about this, so don't know how to start. After googling i found CS Core N Audio Can help me i don't know how. public

How transfer system mic audio stream to attached device mic audio stream

假装没事ソ 提交于 2019-12-01 17:00:30
问题 I am trying to attach USB device used for tele calling which have pnp sound controller for mic and speaker. Now i have two speaker and two mic for input output as shown in image below.. Now my motive is to transfer audio stream from system mic to usb mic and from usb speaker to system speaker. I tried to solve this issue with virtual cable software but with this i need to depend on third party. What can be the possible solution that can attained using c#. I don't have knowledge about this, so

NAudio in Windows Azure /Windows Server 2008 R2

折月煮酒 提交于 2019-12-01 14:37:55
I am using NAudio to merge a few mp3 files together for a Windows Azure product. It works fine in the dev environment but once i upload it to Azure, I get the "No Drive Calling acmFormatSuggest" error. Here's the list of things I have done so far on the Windows Azure Box, trying to fix the issue. (i) Enabled Windows Audio Service (ii) Installed the Fraunhofer IIS MPEG Layer-3 ACM Codec that is supported by Windows Media Player. (iii) Installed the Lame Mp3 Codec (iv) Installed the K-Lite Codec The process itself is a worker process and is running under full trust. The code itself reads the mp3

NAudio from stream? play audio

前提是你 提交于 2019-12-01 14:28:14
I am trying to convert my .net project to .net core (IoT core). Everything is working except my "system.media" block as .net core doesn't come with system.media at all. My options to this is to use NAudio apparently. However, I have no clue how to make NAudio play audio from a Stream. This is the current code I am trying to convert with NAudio. Any suggestions? public void PlayAudio(object sender, GenericEventArgs<Stream> args) { SoundPlayer player = new SoundPlayer(args.EventData); player.PlaySync(); args.EventData.Dispose(); } I tried with this code but got no success. using (Stream ms = new

NAudio from stream? play audio

爷,独闯天下 提交于 2019-12-01 12:54:56
问题 I am trying to convert my .net project to .net core (IoT core). Everything is working except my "system.media" block as .net core doesn't come with system.media at all. My options to this is to use NAudio apparently. However, I have no clue how to make NAudio play audio from a Stream. This is the current code I am trying to convert with NAudio. Any suggestions? public void PlayAudio(object sender, GenericEventArgs<Stream> args) { SoundPlayer player = new SoundPlayer(args.EventData); player

Convert a wav file to 8000Hz 16Bit Mono Wav

大兔子大兔子 提交于 2019-12-01 06:37:19
问题 I need to convert a wav file to 8000Hz 16Bit Mono Wav. I already have a code, which works well with NAudio library, but I want to use MemoryStream instead of temporary file. using System.IO; using NAudio.Wave; static void Main() { var input = File.ReadAllBytes("C:/input.wav"); var output = ConvertWavTo8000Hz16BitMonoWav(input); File.WriteAllBytes("C:/output.wav", output); } public static byte[] ConvertWavTo8000Hz16BitMonoWav(byte[] inArray) { using (var mem = new MemoryStream(inArray)) using