New Post: InvalidOperationException on playing some MP3 files
markheath wrote:It should be very rare that MP3s contain frames of different sample rates. It is usually a sign someone has tried to concatenate parts of two completely different MP3 files/I think this...
View ArticleNew Post: InvalidOperationException on playing some MP3 files
You are confusing bitrate and sample rate. NAudio has no problem playing VBR MP3s that have different bitrates in every frame. The trouble is when the sample rate or the channel count changes. If that...
View ArticleNew Post: Stuck in no mans land -> but yet so close :-/
In a mix of trying to alter code fom this tutorial: https://www.youtube.com/watch?v=ZnFoVuOVrUQ - and trying to get the peak values of a recorded wave I ended up with this:while (wave.Position <...
View ArticleNew Post: InvalidOperationException on playing some MP3 files
Thank you for replyI got something wrong with CBR VBR.As you say different frame may have different bit rate but has the same sample rate. Is it possible has different sample rate too?I have sent the...
View ArticleNew Post: Get/access excact peak levels -> Stuck in no mans land -> but yet...
what format are you recording in? ToSingle assumes you are capturing as IEEE float.
View ArticleNew Post: Convert WaveStream to double-array (or apply FFT directly)
I'm reading a mp3-file and convert it to a WaveStreamMp3FileReader mp3 = new Mp3FileReader(open.FileName); WaveStream pcm =WaveFormatConversionStream.CreatePcmStream(mp3);Now I'd like to convert that...
View ArticleNew Post: InvalidOperationException on playing some MP3 files
Yes, that particular file has been mentioned to me before. The first two frames are 48kHz, whilst the rest is 44.1kHz. I have no idea why this might be. I thought at first they might be XING or VBRI...
View ArticleNew Post: Convert WaveStream to double-array (or apply FFT directly)
I've answered your question on StackOverflow. Also, unless you are using a really old NAudio, no need for the WaveFormatConversionStream. Simply reading out of the Mp3FileReader will give you PCM. It...
View ArticleNew Post: Convert WaveStream to double-array (or apply FFT directly)
Thanks for the quick reply, Mark.How can I split the channels and why do I need it anyways? My FFT (the one by Lomont) asks for interleaved pairs of the real and immaginary parts.Up until now I thought...
View ArticleNew Post: Convert WaveStream to double-array (or apply FFT directly)
the left and right samples will be interleaved, so just throw every other one away if you only need to do the FFT of one channel. Audio is entirely real, so the imaginary component of the input signal...
View ArticleNew Post: Convert WaveStream to double-array (or apply FFT directly)
Ok, very well :)Is there an easy way to check whether the FFT worked correctly?Before applying the FFT I split the audio-material in chunks of 4096 bytes (to keep some kind of time-domain).I created a...
View ArticleNew Post: InvalidOperationException on playing some MP3 files
FYI, I looked at the file in question... The first frame starts 528 bytes after the "official" end of the ID3v2 tag (when seeking from the start using the tag's length field). If the decoder just...
View ArticleNew Post: InvalidOperationException on playing some MP3 files
thanks ioctlLR, I'll revisit the code, I know I check a few of those things, but maybe one is missing.
View ArticleNew Post: Mic input to effectStream Output
Hello, Now I creating my project about Effect Guitar by DSP. then my project have some problem about MIC input to effectStream. Because I get data form MIC-input by WaveIn and get data into...
View ArticleNew Post: Convert WaveStream to double-array (or apply FFT directly)
4096 is the number of bytes not the number of samples. To work out the bin sizes, N is the number of samples (i.e. complex numers)
View ArticleNew Post: Convert WaveStream to double-array (or apply FFT directly)
I'm sorry, I don't quite get what you are trying to say. Can you explain it in a different way?
View ArticleNew Post: Convert WaveStream to double-array (or apply FFT directly)
say you record 4096 bytes of audio. If it is 16 bit that means you have 2048 samples. If it is stereo, you have 1024 sample pairs (and you should only pass one channel in to the FFT). So your bin...
View ArticleNew Post: InvalidOperationException on playing some MP3 files
brilliant, the channel mode check fixes the "Sleep Away" MP3, and I've checked the fix in. Unfortunately it does not fix the other two example files I have. I wonder if there is a problem with my...
View ArticleNew Post: Playing Midi Files
Anyone got example/tips on how to play Midi files using NAudio?All I have found is sending note signals to midi synthesizer midiOut.Send(MidiMessage.ChangePatch(47, 0).RawData); But looping through...
View Article