change the EffectStream code so its constructor takes an IWaveProvider, and so that EffectStream just implements IWaveProvider. Then you can delete its Length and Position properties. Makes life simpler.
New Post: Mic input to effectStream Output
New Post: Detect digital silence in a wave file
You would need to examine each sample individually. A series of consecutive zero values would indicate a period of silence. Then you can copy bits between silence into new wave files using WaveFileWriter.
New Post: Playback capture MMDevice to an specific render device
You'd have to ask someone who knows the CoreAudio API really well. Perhaps there is a way of getting and setting that "Listen to this device" property.
Mark
New Post: Obtaining Audio Device GUIDs
You are enumerating all endpoints. Try just asking for Render or Capture devuces. Use DataFlow.Render or DataFlow.Capture
Mark
New Post: WaveIn.Device not giving proper result if audio service is stopped
No other way that I know of I'm afraid, unless you want to try using the MMDeviceEnum (part of CoreAudio API for Windows Vista and above)
New Post: WaveOut FFT spectrum
XAML files are used with WPF, not winforms
New Post: Why No MP3 License?
Hi Mark,
That's great, thank you for coming back to me.
Kind Regards,
Steve
New Post: Detect digital silence in a wave file
Thank you Mark!
Could you tell me where I can find an example on how to read a wave file sample by sample?
Again, thank you very much for your help.
New Post: Obtaining Audio Device GUIDs
Thank you Mark, that helped a lot.
New Post: Can't make spectrum to work - VB 2010
Thanks, works now..
This line
waveOutDevice.Init(inputStream)
changes to
waveOutDevice.Init(New SampleToWaveProvider(waveChannel))
and this is gone
inputStream = New WaveChannel32(mp3Reader)
New Post: Why No MP3 License?
mingoox:
A couple of points to consider, as well:
1) Ogg Vorbis support with NAudio is simple: NVorbis (specifically NVorbis.NAudioSupport). Also on NuGet. The usage is generally similar to Mp3FileReader.
2) If you are in the U.S., and this is a commercial project, MP3 might come with baggage you don't want. Specifically, you might need a license to distribute the encoded files - OR - might need to use a licensed encoder to get the distribution license. IANAL, so please check with an attorney if you want to make sure.
Performance differences between NVorbis and NAudio MP3 are hard to say offhand... NVorbis isn't native code, so it has some CLR overhead to deal with. NAudio MP3 is partially native code (all the expensive parts), but pays the P/Invoke "tax" for the privilege. NVorbis uses larger buffers, but NAudio MP3 has to use multiple buffers. Benchmarks will be your friend here.
If you choose to use Vorbis, I recommend using the latest version of the aoTuv encoder.
Good luck with your project!
New Post: Playback capture MMDevice to an specific render device
I will search for a solution and I will post it here when I found it
Thanks for all
New Post: WaveOut FFT spectrum
And how should it then help me to get a winforms spectrum Display with NAudio? Unfortunately your demo app sc can´t be compiled due to .net and VS Version Problems: I use VS 2008, .NET 3.5 and I can´t get along with the wpf things.
New Post: Which version of NAudio should I use to introduce the "effects and effectstream" code used for the Skype Voice changer
Hi there,
Our product currently has version 1.5.3.0 and based the SkypeVoiceChanger article, you used an unreleased version of NAudio (v 1.5.4.0).
Given what you had stated, should I be using the 1.6 release to make use of the effects engine you had described in the Skype Voice Changer article?
Paul
New Post: Which version of NAudio should I use to introduce the "effects and effectstream" code used for the Skype Voice changer
yes, 1.6 is probably a good choice. The most of the effects engine wasn't in NAudio anyway. It resided in a separate assembly called jsnet.
New Post: Which version of NAudio should I use to introduce the "effects and effectstream" code used for the Skype Voice changer
thank for your quick response. Another question....I would like to use a 2 band EQ (bass, treble only). Is this available, or would I have to make a custom 2-band EQ from the 3-band EQ example?
Paul
New Post: Why No MP3 License?
Hi ioctlLR,
Thanks for your advice! I have actually integrated NVorbis already (I melded the support it provides into AudioFileReader for consistency). Thanks for the encoder link, that'll no doubt come in very handy.
I've found that OggVorbis files are substantially slower to initialise, at least using NVorbis, and that they sometimes suffer a quality issue when I fade the volume in/out. I can work around the slower initialisation using an audio thread and pre-loading the files, but I don't suppose you have any advise regarding the volume quality issue? Currently as you can imagine from what I've described so far, I have the NVorbis VorbisStreamReader working the same way as an Mp3FileReader within the AudioFileReader class.
Kind Regards,
Steve
New Post: Which version of NAudio should I use to introduce the "effects and effectstream" code used for the Skype Voice changer
Although I am not new to C#, I am sort of new to NAudio....how would one go about make use of the 1.6 framework to integrate the 3BandEQ as an example. The namespaces are so different, so am wondering which classes do I start playing with?
Paul
New Post: Why No MP3 License?
mingoox:
Cool. That sounds like a nice little addition to NAudio.
The startup performance is a bit of a concern... Let's move this over to the NVorbis project so we don't pollute Mark's inbox with unrelated discussion... :)
Do you mind creating a bug report?
New Post: Why No MP3 License?
Hi ioctlLR,
I have a feeling it was down to the file I was playing rather than anything else, since my own files are both decent quality and loading quickly :) I will skip over to NVorbis if I have any other issues though, at the moment I'm just working on getting my code to respect NVorbis better and to avoid spamming sfx, etc.
Cheers for your replies
Steve