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

Source code checked in, #935f95c2a8ff

$
0
0
changes to MediaFoundationReader to support different threading models, and requesting float. Fixing a bug in WaveMixerStream. WPF Demo is getting a Media Foundation Playback demo (work in progress)

Commented Issue: windows phone 8 project support [16376]

$
0
0
Hello!
I have problem when trying to get NAudio from Nuget in my Windows Phone 8 project.
Here is log from console:
PM> Install-Package NAudio -Pre
Successfully installed 'NAudio 1.7-alpha01'.
Successfully uninstalled 'NAudio 1.7-alpha01'.
Install failed. Rolling back...
Install-Package : Could not install package 'NAudio 1.7-alpha01'. You are trying to install this package into a project that targets 'W
indowsPhone,Version=v8.0', but the package does not contain any assembly references or content files that are compatible with that fram
ework. For more information, contact the package author.
At line:1 char:1
+ Install-Package NAudio -Pre
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Install-Package], InvalidOperationException
+ FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PowerShell.Commands.InstallPackageCommand
Comments: I'm afraid there is no Windows Phone 8 support at this time. Windows Store apps is next on the agenda.

Edited Feature: MediaFoundation Output Format Float [16375]

$
0
0
Hello,<br />Here is a modified version of MediaFounfationReader.<br /><br />Modification for operation with WASAPI, ASIO, WaveOutEvent<br /><br />I added an option :: The output format (WaveFormat) is PCM or IEEE<br /><br />Compatible with the version NAudio 569799226a61<br /><br />This version is still a prototype!

Commented Issue: Exception on Resampling [16374]

$
0
0
When I using ResamplerDmoStream and selecting Anything except WaveOutput (e.g. WASAPI, DirectSound) I've getting below exception:
Unable to cast COM Object 'NAudio.DMO.ResamplerMediaComObject' to interface type 'Naudio.Dmo.IMediaObject' ...
Comments: this is because you are using it from a different thread than the one it was created on. For NAudio 1.7 I'm hoping to come up with some better ways to handle this type of thing

Source code checked in, #e0554c0fcc72

$
0
0
resolving issue 16373 - nullreference exception with CueList

Edited Issue: NullReference exception with CueList [16373]

$
0
0
Second constructor in CueList file is missing the initialization of the cues member.<br />"private List<Cue> cues = new List<Cue>();"<br /><br />This produces a null reference exception when trying to use the CueWaveFileReader.<br /><br />I suggest you initialize the list inline instead.<br /><br />NAudio-Source\NAudio\Wave\WaveStreams\CueList.cs, line 92<br />from<br />private List<Cue> cues;<br />to<br />private List<Cue> cues = new List<Cue>();

Commented Issue: NullReference exception with CueList [16373]

$
0
0
Second constructor in CueList file is missing the initialization of the cues member.<br />"private List<Cue> cues = new List<Cue>();"<br /><br />This produces a null reference exception when trying to use the CueWaveFileReader.<br /><br />I suggest you initialize the list inline instead.<br /><br />NAudio-Source\NAudio\Wave\WaveStreams\CueList.cs, line 92<br />from<br />private List<Cue> cues;<br />to<br />private List<Cue> cues = new List<Cue>();
Comments: thank's for reporting, I've made the fix

Source code checked in, #47fd96bed6ef

$
0
0
initial effort at getting WASAPI out working in WinRT

Source code checked in, #e62db2741b17

$
0
0
worked out how to make the Resampler in WinRT - you have to use the IMFActivate interface

Source code checked in, #0f00faa957c7

$
0
0
WASAPI playback sort of working in Win Store app

Source code checked in, #5d69b92a07ae

$
0
0
creating MediaFoundationReader on MTA Thread in WinRT as we can't recreate it in read.

Source code checked in, #66f61496227d

$
0
0
found what was causing WASAPI out on WinRT to stutter (need to set reftimes in event shared mode). Experimental MediaElementOut class for WinRT which currently crashes.

Source code checked in, #488620931238

$
0
0
fixed a bug in ASIODriverExt validating input channel count

New Post: Volume Meter

$
0
0

Hi,

   I have created player using NAudio and now I have to add VOLUME METER. I use the following code.

 

WaveOut Player = new WaveOut();

string fileName;

AudioFileReader FileReader;

FileReader = new AudioFileReader(fileName);

Player.Init(FileReader);

Player.Play();

 

How I add volume meter to my player... from where I get value for Volume meter..

 

Thanks & Regards,

Hinshin

New Post: BPM Calculation with .wav file?

$
0
0

Hi there, 

I'd like to find the BPM of a .wav file. Is it possible to use NAudio to calculate this? 

Thanks!


New Post: BPM Calculation with .wav file?

$
0
0

hi, I'm afraid NAudio does not include a BPM detection algorithm. It does offer access to the raw PCM samples though, so you could use it in conjunction with a detection aglorithm

Mark

New Post: Volume Meter

$
0
0

Hi,

   I have created player using NAudio and now I have to add VOLUME METER. I use the following code.

 

WaveOut Player = new WaveOut();

string fileName;

AudioFileReader FileReader;

FileReader = new AudioFileReader(fileName);

Player.Init(FileReader);

Player.Play();

 

How I add volume meter to my player... from where I get value for Volume meter..

 

Thanks & Regards,

Hinshin

New Post: Volume Meter

$
0
0

hi, have a look at the Audio File Playback code in the NAudioDemo project. This shows how to create a volume meter and update it.

New Post: How to code circullar buffer to create a delay and used the wavein for micrcophone and output to speaker?

$
0
0

in your code sample above, waveOut.Init should take the bufferedProivder not waveIn. That will mean you are playing from you buffered provider.

New Post: How to code circullar buffer to create a delay and used the wavein for micrcophone and output to speaker?

$
0
0

Hi Mark again,

I have implemented my won BufferedWaveProvider as you said, and it was successfully worked. First of all thank you for your advice.

I want to ask another question.

I have multiple analog inputs and I have to sum all of these inputs to route the sum to other waveOut devices.

I have created a list of bufferedwaveProviders that each element is serving for each wave input (recording). ( I have to have an ability to return back to n seconds in any time, so I have used bufferedWaveprovider with some editing)

Now I can route one waveIn analog device to waveOut analog device with the help of this bufferredWaveProvider.

And for summing the audios I have coded like the one below. 

privatevoid SumProviders(int length)
            {byte[] last = newbyte[length];byte[] temp = newbyte[length];int bytesPerSample = 4; for (int index = 0; index < bufferedWaveInProviders.Count; index++)
                {//read wave providers one by one
                    bufferedWaveInProviders[index].Read(temp, 0, length);//add all...for (int i = 0; i < length / bytesPerSample; i++)
                    {float sampleTemp = BitConverter.ToSingle(temp, i * bytesPerSample);float sampleLast = BitConverter.ToSingle(last, i * bytesPerSample);
                        sampleLast = sampleLast + sampleTemp;byte[] bytes = BitConverter.GetBytes(sampleLast);
                        Array.Copy(bytes, 0, last, i * bytesPerSample, bytesPerSample);
                    }
                }
                bufferedWaveForPlaying.AddSamples(last, 0, length);
            }

I am calling this function on sourceStream_DataAvailable event handler of my waveIn devices for each input.

Here bufferedWaveForPlaying is the buffer that I have initilized my waveOut device with. 

Now I am hearing the mixed audio, but playing speed is too slow? What can be the problem?

 

Viewing all 5831 articles
Browse latest View live


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