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

New Post: SawTooth - I have what looks like a SawTooth waveform, but....

$
0
0

great, glad you got it working in the end

Mark


New Post: How to get samples of wav file using Naudio?

New Post: "What you hear" feature

$
0
0

This is done using "loopback recording", which can be done using WASAPI in on Windows Vista and above (see the WasapiLoopbackCapture class). If you want to do it with WaveIn, you are completely reliant on what your soundcard drivers allow, and it is a lot of work.

New Post: WaveOutEvent stops playing sound after some hours of playing

$
0
0

You probably don't need to use WaveOffsetStream which might simplify your code a bit. Are there any actions happening on other threads (such as changing position)? There could be threading issues if Read is called on a different thread to a reposition.

New Post: NotifyingSampleProvider with a BufferedWaveProvider

$
0
0

hi, glad you got it working in the end

New Post: Change volume for DirectSoundOut

$
0
0

I have an application where I need the ability to loop the audio stream from the input to the speakers.  I am currently doing this with WaveIn and DirectSoundOut. 

Everything here works except that the DirectSoundOut says that it does not support volume when I get down to that line of code. How can I change the volume of the audio being sent to the speakers? If it means I cannot use DirectSoundOut that is fine, but what would I use?

I'm setting up using the code below:

private void button1_Click(object sender, EventArgs e)
{
    if (waveIn == null)
    {
        waveIn = new WaveIn();
        waveIn.WaveFormat = new NAudio.Wave.WaveFormat(sampleRate, bitsPerSample, channels);
        
        if (waveOut == null)
        { 
            WaveInProvider waveInProvider = new WaveInProvider(waveIn);
            waveOut = new DirectSoundOut();
            waveOut.Init(waveInProvider);
        }

        waveOut.Volume = volumeSlider1.Volume;

        waveIn.StartRecording();
        waveOut.Play();
    }
}

New Post: Understand if someone (human) is speaking in real time

$
0
0

Hi Mark,
I read your stackoverflow's answer... Ok, i can't understand if the voice i'm analyzing is human or not but i know about the dB range of human voice and for now it's ok....
In my last test i wrote wrong code to calculate dBs... my mistake....
P.S.: Good job with NAudio because it's a very interesting and useful library!

 

Thanks,

Enrico

New Post: NAudio in a non GUI thread

$
0
0

WaveOut in FunctionCallback mode does not generate a PlaybackStopped event on USB device pull out. I switched to WaveOutEvent and that worked.


New Post: Windows 8 WinRT Metro Style Support

$
0
0

Hi Tom, 

Have you done your patch yet ? I'm also considering doing mine. I want to convert a subset of NAudio (CoreAudio) in order to use it in a store application. Right now I'm stuck with custom marshaling (ICustomMarshaler doesn't exist). Is your patch available ? Have you the same problem ? 

Thanks. 

Olivier

New Post: Playing gsm phone call

$
0
0

Yes,that Gsm610WaveFormat was just a random idea and as I now remember the gsm modem send the data in format as used above.

Well. Now I changed the initalizing as shown

 

                waveProvider = new BufferedWaveProvider(new WaveFormat(8000, 16, 1));
                waveRecorder = new WaveRecorder(waveProvider, incomingWavFilename);

                waveOut = new WaveOutEvent();
                waveOut.DeviceNumber = waveDevice.OutDeviceNumber;
                waveOut.DesiredLatency = 150;
                waveOut.Init(waveRecorder);
                waveOut.PlaybackStopped += new EventHandler<StoppedEventArgs>(waveOut_PlaybackStopped);

                waveOut.Play();

 

And now in SerialPort DataReceived I just call BufferedWaveProvider.AddSamples?

Is there any problems if the buffer starts to increase, ie. 2h calls?

Thanks.

New Post: NAudio and Live Sample Processing

$
0
0

NAudio isn't highly optimised for speed, but it should be possible with 44.1kHz audio on a relatively modern machine. Are you mixing down to file or trying to play the mixed audio back?

New Post: Issues Adding Audio Device names to a List view

$
0
0

I suspect its a problem with the way you're adding rows to your ListView control. Try adding rows with hard-coded values to narrow down where the problem is occuring.

New Post: Change volume for DirectSoundOut

$
0
0

Either use WaveOut/WaveOutEvent instead, or you would need to modify the levels of each sample (e.g. using VolumeWaveProvider16)

Mark

New Post: WaveOutEvent buffers is null

$
0
0

this exception should no longer be unhandled in the latest code as we catch any exceptions thrown in buffer.OnDone

New Post: NAudio skipping when playing from microphone but not from file

$
0
0

WaveInProvider fills a buffer with audio as it is received. If there is nothing in the buffer, you'll hear a gap in playback. You will probably need to tweak your buffer sizes for input and output latency to get this working smoothly.


New Post: NAudio and Live Sample Processing

$
0
0

We are playing back. In fact we are streaming, but it would have to be pretty much real time. All we are interested in is the resampling code... literally converting 6 sample streams into 2.

New Post: NAudio in a non GUI thread

$
0
0

I don't recommend using FunctionCallback. It has been nothing but trouble. WaveOutEvent is the preferred approach.

New Post: Playing gsm phone call

New Post: Issues Adding Audio Device names to a List view

$
0
0

You mean just manually add some strings to my list?

New Post: Problem with large wave file playback

$
0
0

Thanks for the quick reply!

I have looked through the source code, and I'm not actually trying to do a direct playback. I am eventually going to add features that allow me to speed up and slow down playback and I don't think this can be done without buffers.

My goal at this point is the ability to mix say 10 audio files and play them back simultaneously. I've looked through the MixDiff project and doesn't seem to do this currently.

Any other advice or tips on how I could accomplish this?

Viewing all 5831 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>