Quantcast
Channel: NAudio
Viewing all 5831 articles
Browse latest View live

New Post: Audio Sample Position

$
0
0
Apologies for being so vague. This is what I would like to do: Analyze each sample in a wav file. For each sample, I want to get its position while additionally performing an FFT or autocorrelation on it. So if the audio file is 1 minute in duration and I know there is a Middle C in there, I want to find its start or onset time (in milliseconds). Or I might like to find the onset for another primary frequency in the audio. I know this is a difficult thing...

I'm not playing or recording, just analyzing. Also, I just finished both Pluralsight classes. They were very helpful.

Brandon

New Post: Creating a mixed file of 4 sounds. How can I achieve that?

$
0
0
So, I am working on something that need a simple interaction's user.
I have 4 sounds : 1 background and 3 others for user's interaction, the interaction occurs by the respective audio button pressed.

I am using the AudioFileReader to read the mp3 audio files and using the WaveOut to play it.
I need to record a file where have the background file and the user interaction with the audios. How can I get that? ( I searched and I found a WaveIn, WaveStream and WASABI too, but I don't know what is the best to do that).

Another thing is, this audio recorded has to be a mp3 audio. I know about the wav record, but I need to get a mp3 file. Someone has some advice?

Thanks

New Post: How can I position an mp3 streaming?

$
0
0
You'd need to buffer all the MP3 frames somehow (in memory or to a file), and then when a reposition occurs, move back to the frame that contains that time.

New Post: Audio Sample Position

$
0
0
Well you know where you are in the file from the Sample Rate. If (say) there are 44100 samples per second, then to 44100th sample is at 1.0 seconds.
Also you can't perform an FFT on an individual sample - you'd do it on a block of samples (say 512).
Glad you found the pluralsight courses helpful :)

New Post: Implemented Loopback capturing for NAudio

$
0
0
You should be referencing the latest version of NAudio rather than creating your own copy of WasapiLoopbackCapture.

New Post: Creating a mixed file of 4 sounds. How can I achieve that?

$
0
0
Look into MixingSampleProvider to perform the mixing.
Look into MediaFoundationEncoder to create MP3 (although this is only usually available on Windows 8 or above)

New Post: NAudio read a .wav and send to socket

$
0
0
create a timer that ticks say 10 times a second and then send just 100ms seconds of the audio when the timer ticks

New Post: Mp3 streaming problem using NAudio - C#

$
0
0
you will get stuttering if you can't download as fast as you need to play. Check out my article here for a possible approach to buffering streaming MP3.

New Post: Managed to sqeeze a beep on Windows Phone 8.1 with NAudio WasapiOutRT

$
0
0
great, thanks for keeping us updated

New Post: Implemented Loopback capturing for NAudio

$
0
0
Hi markhealth thnk you . i am making a c# .net window application. add reference of 1.7.2.19 version. i want to record what i hear. can you guid me pls how i start,stop and save on hard drive in window form using C# ??? thnk you

New Post: Mp3 streaming problem using NAudio - C#

$
0
0
I read your article before getting started and but i couldnt do it with your algorithym. Even if download progressbar is on 50%, played duration is 10 sec and mp3 durations is long enough this problem occurs again .Can yolu give me your NAudioDemo source code?

New Post: Mp3 streaming problem using NAudio - C#

$
0
0
it's all here on CodePlex. Click the Source Code link above and look in the NAudioDemo project

New Post: developing for win ce 6.0 ??

$
0
0
can I make mp3 player for win ce 6.0 ? does naudio work on net compact framework 3.5 ?? sorry for my English)

New Post: Creating a mixed file of 4 sounds. How can I achieve that?

$
0
0
Thanks for the reply Mark.
But, for now that looks like will be too much work. I am trying here but without any success. :(
So, now I have a new possibility, ignore the mp3 files to work with wavefiles.
But the MixingSampleProvider returns a error about 'all files have to be as the same WaveFormat'. I searched for this and in a example, you create new files with waveformat.
Even if I am working with wave files in 16 bits (Audacity's convertion), will do I need create a new file?
Could you give some more explanation about it?

Thanks again.

New Post: Audio Sample Position

$
0
0
Thanks Mark. That is very helpful. Yeah, I realized recently that I should have said I'm doing FFT on a group of samples-not one.
Anyway, your answer solves my issue.

Thanks again,

Brandon Campbell

New Post: How to concatenate two Wave files in memory to play

$
0
0
Hello all

please read below if you care about the big picture. The specific thing we're looking for is how to build such an IWaveProvider that can concatenate two (or more) WAV files in memory. Here's our take on it:

https://gist.github.com/BrainCrumbz/091de69fbbec6ad5fcd6

but we're facing an unhandled COMException when we try to encode starting from such a provider.

Could you please help us understanding what's wrong, or point us to a working provider that can join WAV files?

Thanks all for your time!


BIG PICTURE:
we're working with NAudio in order to read some WAV files, combine (aka join or concatenate) them together in memory and then saving the result as WMA file.

We had hard times trying to even convert a single file from WAV to WMA using NAudio.WMA Nuget, that is NAudio.WindowsMediaFormat namespace. When using WmaWriter.Write we faced the "scary" Object contains non-primitive or non-blittable data exception from deep down in GCHandle.Alloc in WmaWriter c'tor and we decided to pull back for the moment.

So we switched to NAudio.MediaFoundation, as in several places it has been suggested as a simpler way to achieve WMA encoding. That has proved to be true: we could easily convert a single WAV file to a WMA file quite soon.

Now the trouble we have is how to combine two (or more) WAV files into an IWaveProvider, which can then be fed into MediaFoundationEncoder.EncodeToWma.

New Post: Creating a mixed file of 4 sounds. How can I achieve that?

$
0
0
Hello again,
So, now I understood a little of the process and I started to use your AudioPlackEngine code. Btw, nice code.
I had to make some changes (just SampleRate value to 16000) - what I can change again, if necessary - to work with my audios.
AudioPlackEngine is working pretty well.
But, I still have a problem.
How can I record the mixer from the AudioPlackEngine?
I tried access the mixer, but the application returns a error about 'WAV too large'.

Thanks.

New Post: Creating a mixed file of 4 sounds. How can I achieve that?

$
0
0
I was looking for some way to get it done, and I found that post (here).
I was thinking if the problem could be just the mix doesn't stop.
But I need to know if the main sound is stopped.
Remember, I am using AudioPlacybackEngine.

Thanks and sorry if I am being annoying but I really need to have this done.

New Post: Creating a mixed file of 4 sounds. How can I achieve that?

$
0
0
yeah, don't try to save a never-ending stream to a WAV file! I'd recommend picking a length for the file and when it gets over that length starting a new WAV file

New Post: Creating a mixed file of 4 sounds. How can I achieve that?

$
0
0
The length of the 'mixed' audio must be the length of the background audio (first audio to play). OK?
The other audio, will be played during the background audio is playing.
This part is working right now. I add them to the mixingsample instance as when necessary.
But the save this mixed file is being my problem. I will need to read the bytes again from mixer instance to write a file?
Please, could you give more info about this?

Thanks again to be so nice.
Viewing all 5831 articles
Browse latest View live