Source code checked in, #935f95c2a8ff
Commented Issue: windows phone 8 project support [16376]
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]
Commented Issue: Exception on Resampling [16374]
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
Edited Issue: NullReference exception with CueList [16373]
Commented Issue: NullReference exception with CueList [16373]
Comments: thank's for reporting, I've made the fix
Source code checked in, #47fd96bed6ef
Source code checked in, #e62db2741b17
Source code checked in, #0f00faa957c7
Source code checked in, #5d69b92a07ae
Source code checked in, #66f61496227d
Source code checked in, #488620931238
New Post: Volume Meter
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?
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?
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
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
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?
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?
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?