New Post: why divide by 32768f
http://naudio.codeplex.com/SourceControl/latest#NAudioWpfDemo/AudioPlaybackDemo/SampleAggregator.cs
View ArticleNew Post: why divide by 32768f
ok I got it ... but I am not reading from a file. I am reading from a microphone void Voice() { //Byte[] buffer = new Byte[10]; // sound from the Mic int deviceNumber = 0; waveIn = new WaveIn();...
View ArticleNew Post: why divide by 32768f
what is with all the this. ? public SampleAggregator(ISampleProvider source, int fftLength = 1024) { channels = source.WaveFormat.Channels; if (!IsPowerOfTwo(fftLength)) { throw new...
View ArticleNew Post: why divide by 32768f
why are you doing this ? aggregator.NotificationCount = inputStream.WaveFormat.SampleRate / 100; why are you dividing my 100? also are you using the default Sample rate?
View ArticleNew Post: why divide by 32768f
also in SampleAggregator.cs the Read function calls Add function and the Add function calls the FFT function . but where is the Read function called to start all of this off?
View ArticleNew Post: why divide by 32768f
wait before I do all of that... i just learned that my program is kind of working ... I am using this site for testing now http://onlinetonegenerator.com/?freq=5000 and not that youtube video ... I...
View ArticleNew Post: why divide by 32768f
someone else told me that the samples might actually be 8-bit samples, not 16-bit if that is so then I am cutting my in coming samples in half PointPairList list = new PointPairList(); PointPairList...
View ArticleNew Post: why divide by 32768f
If you can get it working then that's fine. I'd use SampleAggregator personally since it is done and tested. i dont think it matters what the bitspersample is. max volume should still be about 1.0f
View ArticleNew Post: why divide by 32768f
I think it does... it is it 8 bit samples that i am losing have my samples but is it 16 bit then I am doing it right so which is it ?
View ArticleNew Post: why divide by 32768f
so I just tried this : for (int index = 0; index < 32768; index++) { buffer1[tempint] = buffer[index]; tempint++; } and the fft is off so maybe it really is 16bits do anyone know anything that might...
View ArticleNew Post: why divide by 32768f
Not sure but here is the code to get SampleAggregator working init() { WaveIn wavein = new WaveIn(); waveIn.BufferMilliseconds = 250; waveIn.DeviceNumber = 0; //waveIn.DataAvailable +=...
View ArticleNew Post: why divide by 32768f
can anyone tell me if I am read in the sample right? from the microphone ? I know my fft works... because I compared it to mat lab... I just need to know more about reading in for the microphone
View ArticleNew Post: actually 8-bit samples or not 16-bit samples
check it by looking at the bits per sample of the WaveFormat you are recording with. Usually it is 16 bit, but it is possible to record at other bit depths.
View ArticleNew Post: why divide by 32768f
if you construct a signal chain (say WaveIn -> BufferedWaveProvider -> ToSampleProvider -> SampleAggregator), then you will still need something to "pull" data out the other end. Normally this...
View ArticleNew Post: Odd byte[] array behaviour in WaveFormat
Shame that that approach doesn't work with COM. What I usually fall back to is marshalling an IntPtr and Marshal.StructToIntPtr (or whatever it is called) Alternatively in your case, do you even need...
View ArticleNew Post: Odd byte[] array behaviour in WaveFormat
I'm doing it both ways actually: public MediaFoundationDecoder(IMFMediaType inputMediaType, IMFMediaType outputMediaType) public MediaFoundationDecoder(WaveFormat inputFormat, WaveFormat outputFormat)...
View ArticleNew Post: failed to play the following sound file in naudiodemo
Thanks for your answer ... the file is playable on vlc !? also, is there anything I need to set in my c# code ? (buffer size?, etc ...) and, does the directsound driver works with different bit rates ?...
View ArticleNew Post: Odd byte[] array behaviour in WaveFormat
This is strange, I cant seem to create an IMFMediaType in one class and send it through the constructor of another class, it seems to break. Even a simple GetUInt32() fails on it. Same exception. I'm...
View ArticleNew Post: failed to play the following sound file in naudiodemo
Wow, didn't realise it had 8 channels. But you are right, it works in VLC which obviously supports 8 channel audio. The WaveFileReader appears to support many channels but I dont see a static Property...
View ArticleNew Post: failed to play the following sound file in naudiodemo
it's the number of channels that's the problem here rather than the reader. Not all audio output device types will support >2 output channels.
View Article