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

New Post: MF streaming

$
0
0

good idea. I've implemented it a little differently, as sometimes streaming MP3 can report its duration. Basically we check if the duration presentation attribute is available and if so we use it


New Post: Mf Reader :: Filename with Accent

$
0
0

Oh yeah, as usual your version is more simple.

New Post: How to get WaveIn DeviceNumber?

$
0
0

We are using Naudio (1.5) in a C# application. We plug in 3-5 USB microphone in an WIndows 7 machine to make recording. When using WaveIn, we need to give it the index number for the USB devices that plugged in.

waveIn = new WaveIn();

waveIn.DeviceNmber = xxxxx;

......

My question is: how to get device number for each USB microphone we are using?

Thanks a lot

 

Source code checked in, #376c9cc0bfbb

New Post: NAudio can't play some mp3 streaming

$
0
0

bitrate changing should not be a problem - that just means it is VBR. What is a problem is if samplerate or channelmode ever change during the file. If so you'd need to re-open your output device at the new sample rate and channel count and re-create the MP3 decoder. Alternatively you could resample to the desired output sample rate.

Mark

New Post: Volume Meter

$
0
0

I'll need more information than that if you want help. What is the WaveFormat of the WAV file and what error message did you see?

Mark

New Post: How to get WaveIn DeviceNumber?

$
0
0

You can enumerate the available WaveIn devices using WaveIn.GetCapabilities passing in numbers up to WaveIn.DeviceCount

New Post: Volume Meter

$
0
0

hi,

   I was playing wave file with ( Bit Rate: 319 kbps, Audio Sample Rate: 44 kHz) and I was getting the following error...

 

NoDriver calling acmFormatSuggest

 

Thanks & Regards,

Hinshin


Source code checked in, #ff6b902c5d1a

$
0
0
fixed a small bug with Wave32To16Stream.Clip

New Post: How to get WaveIn DeviceNumber?

$
0
0

Thanks for your reply, so if i do this

         int waveInDevices =WaveIn.DeviceCount;
       
for(int waveInDevice=0; waveInDevice< waveInDevices; waveInDevice++)
       
{
           
WaveInCapabilities deviceInfo =WaveIn.GetCapabilities(waveInDevice);
           
MessageBox.Show("Device "+ waveInDevice +": "+ deviceInfo.ProductName+
               
", "+ deviceInfo.Channels+" channels");
       
}

the waveInDevice is the devicenumber for each device.

waveIn = new WaveIn();

waveIn.DeviceNmber = waveInDevice;

Thanks

 

New Post: How to get WaveIn DeviceNumber?

$
0
0

that's right. It's an index, and 0 always is your default audio device

New Post: How to get WaveIn DeviceNumber?

New Post: How to get WaveIn DeviceNumber?

$
0
0

I plugged 2 USB microphones in front of my machine and 1 in the back. The one in the back (Microphone (3-USB Audio Device) has index 0, so this is the default audio device.

Thanks 

New Post: Need a function urgently

$
0
0

Hi Guys,

I urgently need a function that can do the following:

PlayTracks(string DeviceName, string[] output, string[] filenames)

Output would be an array that specifies the output channel on a sound device.

Filenames would be an array that contains the full paths to file names that need to be played.

So the input arrays might be something like:

Output [0]= "1,3" / Filenames[0]="c:\Soundfiles\File1.wav"

Output[1] = "2,3" / Filenames[1]="c:\Soundfiles\File2.wav"

Given this input, the function should do the following:

Open "file1.wav", and assign the left channel to output 1 on the specified device, and assign the right channel to output 3.

Open "file2.wav", and assign the left channel to channel 2 of the specified device, and assign the right channel to output 3.

Once the channels are assigned, the audio should be played.

Some notes:

Playback must loop.

Note how two input channels are assigned to output 3: This should be allowed, and should do a mixdown in real time.

I have been struggling with this for a long time, and I just can't get it right. Some pointers will be very much appreciate, or alternatively if someone can give me a quotation for a function like that, then perhaps one of the specialists on here can do it for me.

Thanks!

 

New Post: Need a function urgently

$
0
0

hi, NAudio has some pieces you will need. For example the MultiplexingSampleProvider does quite a bit of this (but no mixing - you'd want MixingSampleProvider). Looping would probably be best implemented with another wrapped layer on top of this.

Also, what output driver model were you hoping to use? Is this aimed at a specific soundcard with multiple outputs?

Mark


New Post: Need a function urgently

$
0
0

Thank you for your reply Mark,

I looked into MultiplexingWaveProvider and got it working, but then when I tried to do looping, it didn't work. I used the example for looping, which derives a class from WaveStream, but then I can't use the MultiplexingWaveProvider to create an instance of the LoopStream class. (Not the same types...)

I also still don't know: if I assign two inputs to one output, if it will do real time mixdown or not. (I would think it would, but I haven't been able to test it yet). If it does, then I won't need the MixingSampleProvider.

As for the output driver: I don't know which is the most correct, but so far I've tentatively decided on ASIOOut, because I read that it is the best way to access different outputs on a sound device.

I will look at the sample providers instead of the wave providers, and see if that can perhaps sort out my problem...

I guess I can only keep trying. In the mean time, if someone wants to create this function for me, please pm me with quotes...

Thanks!

New Post: Need a function urgently

$
0
0

For your needs, I'd be tempted to write my own LoopingSampleProvider which takes a delegate that can reset all the WaveFileReaders back to Position 0, and call that when the multiplexer reaches the end. The MultiplexingWaveProvider does not do mixing (it just patches inputs to outputs). It would be possible to make a mixing one though (probably adapting MultiplexingSampleProvider to have a grid of multipliers so every output can be a mix of every input).

AsioOut is probably a good idea for multiple output soundcards. It does mean that your users will need an ASIO driver installed on their system.

I do sometimes do bits of paid NAudio consultancy work, so if you do want to discuss a quote, you can get in touch via the contact link on myCodePlex user profile page.

Mark

New Post: Fading to to 50%

$
0
0

Hi,

I am working on a project where i use Naudio to merge 2 mp3 files, the second mp3 file is inserted 20 seconds into the first using the offsetsampleprovider to add 20 seconds silence before using wavemixerstream32 to merge the 2 streams.

I would like the first file to fade to 50% of the volume at ~18 secs, keeping the volume at 50% until 25 secs and the fading back to 100%. I am saving the result to a file. the file is totally 5 mins.

How can I accomplish the fading part using Naudio?

Thanks!

Karl

New Post: Need a function urgently

$
0
0

Thank you again Mark, I will try a little bit with the "sample instead of wave" classes, and if I don't come right, I will contact you... (I'd hate to admit defeat though!)

I think this might help someone else as I couldn't find a clear answer on this: If I have two inputs, let's say L and R, and I use one of the Multiplexing classes, and I mapped both of them to "output 0": Will it generate an error? If not: What will happen?

New Post: Need a function urgently

$
0
0

each output can only be connected to a single input

Viewing all 5831 articles
Browse latest View live


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