tag:blogger.com,1999:blog-6822536077160579260.post2408844574770947121..comments2023-06-05T14:25:52.227+01:00Comments on Sound Code: Recording the Soundcard Output to WAV in NAudioAnonymoushttp://www.blogger.com/profile/17900587357903273800noreply@blogger.comBlogger24125tag:blogger.com,1999:blog-6822536077160579260.post-36761135864548617942012-11-12T12:50:18.276+00:002012-11-12T12:50:18.276+00:00I want to change the frequency of this sinus wave ...I want to change the frequency of this sinus wave without interrupting it and quite quickly . You said in your previous posts that I need to do it smoothly , how can I do that ? Sorry but I'm a beginnerAnonymousnoreply@blogger.comtag:blogger.com,1999:blog-6822536077160579260.post-90703866026817289212011-01-18T14:31:38.932+00:002011-01-18T14:31:38.932+00:00Can I use that source code on windows mobile? Or d...Can I use that source code on windows mobile? Or do you have a code that record a wave file format on windows mobile? (records in a wave file format ..)Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-6822536077160579260.post-23794352489064722672010-11-24T15:07:39.262+00:002010-11-24T15:07:39.262+00:00@HM, an AsioIn class should implement IWaveIn@HM, an AsioIn class should implement IWaveInAnonymoushttps://www.blogger.com/profile/17900587357903273800noreply@blogger.comtag:blogger.com,1999:blog-6822536077160579260.post-67538439052125250242010-11-16T14:30:58.766+00:002010-11-16T14:30:58.766+00:00Thanks Mark. I'm still hopefull, and struggeli...Thanks Mark. I'm still hopefull, and struggeling with adding the ASIO-in interface by myself. I'm trying to figure out where to fit the WaveRecorder class.<br />Since WaveRecorder is actually an IWaveProvider, I plan to add AsioIn.cs which has "recordStream" of class WaveRecord (similar to AsioOut). I'm jyust confused wehther or not I need to add IWaveRecorder, similar to IWavePlayer.<br /><br />Thanks you very much!<br />HMAnonymousnoreply@blogger.comtag:blogger.com,1999:blog-6822536077160579260.post-73913970824045415582010-11-16T11:37:51.933+00:002010-11-16T11:37:51.933+00:00sadly NAudio ASIO support is very basic and doesn&...sadly NAudio ASIO support is very basic and doesn't work with all soundcards at the momentAnonymoushttps://www.blogger.com/profile/17900587357903273800noreply@blogger.comtag:blogger.com,1999:blog-6822536077160579260.post-57377209279974949872010-11-16T11:10:28.846+00:002010-11-16T11:10:28.846+00:00Thanks for the great example. I already noticed it...Thanks for the great example. I already noticed it at NAudio but since it was not actually used in tehir code, the sample was very helpful.<br /><br />One question: I would like to use the WaveRecorder combined with the ASIO4All. The NADIO Asio only has AsioOut.cs. Is there a sample of how the Wave Recorder is used for ASIO?<br /><br />Thanks<br />HMAnonymousnoreply@blogger.comtag:blogger.com,1999:blog-6822536077160579260.post-45153111577623083992010-11-15T13:31:20.731+00:002010-11-15T13:31:20.731+00:00@Seingalt - check my Coding4Fun article and projec...@Seingalt - check my Coding4Fun article and project - <a href="http://skypefx.codeplex.com" rel="nofollow">SkypeFx</a>Anonymoushttps://www.blogger.com/profile/17900587357903273800noreply@blogger.comtag:blogger.com,1999:blog-6822536077160579260.post-82869345910054334522010-11-12T07:22:08.465+00:002010-11-12T07:22:08.465+00:00Hi Mark,
I'd take a look at skype4com objects...Hi Mark,<br /><br />I'd take a look at skype4com objects. <br /><br />Basically, I have a web application that should allow the user to call (for example a Call Center Rep.) from that page and record that conversation.<br /><br />I have done some research on skype4com already but somehow I'm still having a hard time on how I could use it on my application.<br /><br />If you know or have any articles about it just post it here. Like "Using skype4com objects in your web application for biginners" <br /><br />Thanks!Seingalthttps://www.blogger.com/profile/16456458870858627914noreply@blogger.comtag:blogger.com,1999:blog-6822536077160579260.post-29703806413561800502010-11-11T10:13:38.484+00:002010-11-11T10:13:38.484+00:00@Seingalt what do you mean by conversations? conve...@Seingalt what do you mean by conversations? conversations on what program? if you mean skype, then you could look into using the Skype4Com objectAnonymoushttps://www.blogger.com/profile/17900587357903273800noreply@blogger.comtag:blogger.com,1999:blog-6822536077160579260.post-46180085016593896882010-11-11T01:38:07.982+00:002010-11-11T01:38:07.982+00:00Hi Mark,
Great lib by the way.
I just want to as...Hi Mark,<br /><br />Great lib by the way.<br /><br />I just want to ask if you have any ideas about recording conversations?<br /><br />Is it possible to capture it using WASAPI or, in my case since I'm using win XP, WaveIn? Or do you know any alternatives to that? <br /><br />seemenomore1987@gmail.comSeingalthttps://www.blogger.com/profile/16456458870858627914noreply@blogger.comtag:blogger.com,1999:blog-6822536077160579260.post-72432340032292302312010-11-08T08:09:10.272+00:002010-11-08T08:09:10.272+00:00@Jlbin - have a look at the BufferedWaveProvider i...@Jlbin - have a look at the BufferedWaveProvider in the latest code. This can be used to buffer up your data read from the network and can be used to feed the soundcardAnonymoushttps://www.blogger.com/profile/17900587357903273800noreply@blogger.comtag:blogger.com,1999:blog-6822536077160579260.post-50328495824336537092010-11-01T10:17:04.604+00:002010-11-01T10:17:04.604+00:00HI,
Now i am able to capture sound and at the same...HI,<br />Now i am able to capture sound and at the same time i send it over network like this<br /><br /> <br /><br />private void waveIn_DataAvailable(object sender, WaveInEventArgs e)<br /> { <br /> byte[] buffer = e.Buffer;<br /><br /> byte[] dataToWrite = ALawEncoder.ALawEncode(buffer);<br /><br /> if (socket_Audio != null)<br /> socket_Audio.SendTo(dataToWrite, new IPEndPoint(IPAddress.Parse(RemoteIpv6), SoundPort));<br /> <br /> }<br /><br /> <br /><br />Now the problem that i am facing is how to get back this audio at receiving end and and send it to the speaker of the system<br /><br />I am just starting a new thread for rxving data from network<br /><br /> myAudioThread = new Thread(new ThreadStart(AudioListener));<br /> myAudioThread.Start();<br /><br />And in the AudioListener() i use the following code<br /><br /> #region for Audio socket Its rxving audio always<br /> <br /> try<br /> {<br /><br /> socket_Audio = new Socket(AddressFamily.InterNetworkV6, SocketType.Dgram, ProtocolType.Udp);<br /><br /> socket_Audio.Bind(new IPEndPoint(IPAddress.IPv6Any, SoundPort));<br /> IPEndPoint remoteEP = new IPEndPoint(IPAddress.IPv6Any, SoundPort);<br /> //Receive data.<br /> <br /> byte[] byteData;<br /> while (true)<br /> {<br /><br /> byteData = new byte[2048];<br /> //Receive data.<br /> socket_Audio.Receive(byteData);<br /> <br /> //G711 compresses the data by 50%, so we allocate a buffer of double<br /> //the size to store the decompressed data.<br /> byte[] byteDecodedData = new byte[byteData.Length * 2];<br /><br /> //Decompress data using the proper vocoder.<br /> <br /> ALawDecoder.ALawDecode(byteData, out byteDecodedData);<br /><br /> <br /><br /> }<br /><br />Now the decoded audio is in the byte array byteDecodedData.How i send it to speaker of that system.<br /><br />I found only waveOut.Play() and<br /><br /> public override int Read(byte[] buffer, int offset, int count)<br /> {<br /><br /> //code to process data<br /><br /> }<br /><br /> in the examples<br /><br />Pls guide me to the next step....Pls let me know if i am in wrong path.<br /><br />Thanks<br /><br />JIbin<br /><br />jibin.mn@hotmail.comJIbinnoreply@blogger.comtag:blogger.com,1999:blog-6822536077160579260.post-70321078952454903472010-05-21T10:56:30.081+01:002010-05-21T10:56:30.081+01:00hi JC, it probably depends on your sound-card driv...hi JC, it probably depends on your sound-card drivers whether any of the WaveIn options can do this programatically. You might need to get the windows mixer up to select your recording source to make it work.Anonymoushttps://www.blogger.com/profile/17900587357903273800noreply@blogger.comtag:blogger.com,1999:blog-6822536077160579260.post-55774368411546836092010-05-20T08:57:29.592+01:002010-05-20T08:57:29.592+01:00Hi Mark! I'm on Windows 7 and am struggling to...Hi Mark! I'm on Windows 7 and am struggling to get NAudio to record the stereo mix - is this possible, maybe using WASAPI as opposed to WaveIn? I'm not sure how to do this with NAudio if it is.<br /><br />I've used the tutorial example 5 from Codeplex and clicked the "Record all output from my soundcard" button, but it only records what is coming in from the microphone. Any pointers would be greatly appreciated!! Many thanks.JChttps://www.blogger.com/profile/00480996145824505367noreply@blogger.comtag:blogger.com,1999:blog-6822536077160579260.post-35679871796946376232009-10-10T14:28:15.617+01:002009-10-10T14:28:15.617+01:00hi n2o, you can't use WASAPI capture on XP. Us...hi n2o, you can't use WASAPI capture on XP. Use WaveIn instead. See my voice recorder article on the Coding4Fun website to learn more about recording audio in NAudio.<br /><br />http://blogs.msdn.com/coding4fun/archive/2009/10/08/9905168.aspxAnonymoushttps://www.blogger.com/profile/17900587357903273800noreply@blogger.comtag:blogger.com,1999:blog-6822536077160579260.post-4421868954737526042009-10-10T13:57:57.416+01:002009-10-10T13:57:57.416+01:00BTW I am using XP, seems that newest NAudio Demo h...BTW I am using XP, seems that newest NAudio Demo has that function but as exeption said "This functionality is only supported on Windows Vista or newer."<br /><br />One more question about recorder buffer, it contais bytes, so each audio sample is 8bit or divided into several array elements?Unknownhttps://www.blogger.com/profile/13671312541131264818noreply@blogger.comtag:blogger.com,1999:blog-6822536077160579260.post-34984624026695242612009-10-10T13:29:47.882+01:002009-10-10T13:29:47.882+01:00Thank You for replay Mark,
Here I found nice recor...Thank You for replay Mark,<br />Here I found nice recording application example:<br />http://opensebj.blogspot.com/2009/04/naudio-tutorial-5-recording-audio.html<br /><br />Is it possible to programmicaly select the recording device? (choose between mic, line-in and wave etc.)Unknownhttps://www.blogger.com/profile/13671312541131264818noreply@blogger.comtag:blogger.com,1999:blog-6822536077160579260.post-15762161994753346102009-10-10T11:33:46.177+01:002009-10-10T11:33:46.177+01:00This comment has been removed by the author.Unknownhttps://www.blogger.com/profile/13671312541131264818noreply@blogger.comtag:blogger.com,1999:blog-6822536077160579260.post-49574107396683824462009-10-09T20:22:24.167+01:002009-10-09T20:22:24.167+01:00Hi Mark,
I would like to record only the audio fr...Hi Mark,<br /><br />I would like to record only the audio from one single application that plays music. is that possible with the NAUDIO lib ?<br /><br />thanks!<br /><br />JelleUnknownhttps://www.blogger.com/profile/15856997623929235688noreply@blogger.comtag:blogger.com,1999:blog-6822536077160579260.post-24043759061006985622009-10-09T19:43:11.374+01:002009-10-09T19:43:11.374+01:00You need to go to the source code tab and download...You need to go to the source code tab and download the latest and build it. NAudio 1.3 has not yet been released yet.<br /><br />Here's the code for the latest IWaveProvider:<br />http://naudio.codeplex.com/sourcecontrol/changeset/view/28979?projectName=naudio#258022Anonymoushttps://www.blogger.com/profile/17900587357903273800noreply@blogger.comtag:blogger.com,1999:blog-6822536077160579260.post-29341943833262214892009-10-09T19:32:35.660+01:002009-10-09T19:32:35.660+01:00Version that I tried I downloaded today from Codep...Version that I tried I downloaded today from Codeplex.Unknownhttps://www.blogger.com/profile/13671312541131264818noreply@blogger.comtag:blogger.com,1999:blog-6822536077160579260.post-63261737422710563002009-10-09T19:05:54.322+01:002009-10-09T19:05:54.322+01:00This comment has been removed by the author.Anonymoushttps://www.blogger.com/profile/17900587357903273800noreply@blogger.comtag:blogger.com,1999:blog-6822536077160579260.post-55058659435072046612009-10-09T19:05:53.587+01:002009-10-09T19:05:53.587+01:00hi n20,
have you got the very latest NAudio source...hi n20,<br />have you got the very latest NAudio source code out from Codeplex?Anonymoushttps://www.blogger.com/profile/17900587357903273800noreply@blogger.comtag:blogger.com,1999:blog-6822536077160579260.post-48737202319000226442009-10-09T18:55:50.002+01:002009-10-09T18:55:50.002+01:00I have a problem with this.
"LineOutRecorder....I have a problem with this.<br />"LineOutRecorder.WaveRecorder' does not implement interface member 'NAudio.Wave.IWaveProvider.Read(NAudio.Wave.IWaveBuffer)"<br />Source:<br />http://www.paste.lt/paste/879522bf8c12bb7e6c6a7ab7eaad9d22<br />Sollution explorer screenshot:<br />http://i647.photobucket.com/albums/uu198/n2oo/sollution.pngUnknownhttps://www.blogger.com/profile/13671312541131264818noreply@blogger.com