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

New Post: What is the difference between WaveFileWriter.Dispose() and LameMP3FileWriter.Dispose()

$
0
0
I think this is a ownership issue and I assume:
  • WaveFileWriter creates the filestream it writes to and is therefore the owner
  • LameMP3FileWriter uses a unmanaged object which creates the filestream and is therefore not the owner
=> To be sure you should look at the source code (on github, the source on codeplex is really outdated)

New Post: How to mix audio signals during recording?

$
0
0
If you want to mix on the fly you must do that in the data available events of the devices.

The hard point might be to sync them, as the events will not be exactly parallel fired or might have recorded different length.

I´d use a queue of single for each device, where you enqueue the event data sample by sample. While doing this check on each sample if all queues got length>0 and mix/dequeue each sample until one queue has length 0. Put a synclock around it and it should work fine.

Commented Unassigned: Mp3FileReader not in NAudio.Wave namespace [16510]

$
0
0
I'm trying to process an mp3 stream (from the microphone) in memory, without disk I/O, in a Windows Store app. I installed the NuGet package NAudio v1.8.0 but the Mp3FileReader class is not in the namespace NAudio.Wave. Should I be using some other function in this environment?

Comments: Thanks, Mark. I have encountered the same problem with speech recognition. Microsoft's quest to make every platform look the same to the user has had the opposite effect on the developer. I guess I'll have to roll my own if I want it that badly.

Commented Unassigned: Mp3FileReader not in NAudio.Wave namespace [16510]

$
0
0
I'm trying to process an mp3 stream (from the microphone) in memory, without disk I/O, in a Windows Store app. I installed the NuGet package NAudio v1.8.0 but the Mp3FileReader class is not in the namespace NAudio.Wave. Should I be using some other function in this environment?

Comments: try MediaFoundationReader instead. That should work

New Post: 5.1 playback with Naudio?

$
0
0
It was said NAudio is free to use, even for commercial applications

Closed Unassigned: Mp3FileReader ReadNextFrame supposed to increment position? [16482]

$
0
0
I believe in 1.7.3 on nuget, ReadNextFrame results in Position and CurrentTime increasing.

After the below commit, this looks like it's no longer the case. Is that a bug?

https://github.com/naudio/NAudio/commit/1dbc29cdb539cbed794f7daec803bf10f431022f
Comments: have fixed this one now in latest code on GitHub

Commented Unassigned: Mp3FileReader not in NAudio.Wave namespace [16510]

$
0
0
I'm trying to process an mp3 stream (from the microphone) in memory, without disk I/O, in a Windows Store app. I installed the NuGet package NAudio v1.8.0 but the Mp3FileReader class is not in the namespace NAudio.Wave. Should I be using some other function in this environment?

Comments: Still stuck. There seems to be no overload of MediaFoundationReader that will take as stream as an argument. (I can't afford the latency of writing to a file and then reading back again.) Here is what I tried: ``` encodingProfile = MediaEncodingProfile.CreateMp3(AudioEncodingQuality.Low); audioStream = new InMemoryRandomAccessStream(); await mediaCapture.StartRecordToStreamAsync(encodingProfile, audioStream); using (var audioStreamTest = audioStream.CloneStream()) { using (StreamReader reader = new StreamReader(audioStreamTest.AsStreamForRead())) { string textStream = await reader.ReadToEndAsync(); MediaFoundationReader mfreader = new MediaFoundationReader(textStream); } } ``` It fails, of course, because MediaFoundationReader wants to open a file with path = textStream. Would I be able to overload MediaFoundationReader to take a text stream instead of a file?

New Post: WaveChannel32 not panning correctly

$
0
0
I'm using WaveChannel32's pan property to try to control the panning during playback (the channels are added to a Mixer).
When pan=0, the result is as expected but any other value (-1 < 0 or 0 < 1) results in sound being fully panned in either direction, not the expected smooth transition.
I'm not able to override WaveChannel32 to implement a different panning algorithm because many components are marked private.
Any suggestions?

Commented Unassigned: Mp3FileReader not in NAudio.Wave namespace [16510]

$
0
0
I'm trying to process an mp3 stream (from the microphone) in memory, without disk I/O, in a Windows Store app. I installed the NuGet package NAudio v1.8.0 but the Mp3FileReader class is not in the namespace NAudio.Wave. Should I be using some other function in this environment?

Comments: Someone has recently contributed a `StreamMediaFoundationReader` class which you can try out if you get latest coed. Haven't tried it out myself yet, so can't say how reliable it is

New Post: Multichannel ASIO Input Playback

$
0
0
Hello,
I have an Multichannel USB Audio Device. I try to playback Channel 9 & 10 (Stereo) on Windows 10. Recording with "asioOut.InitRecordAndPlayback" with "asioOut.InputChannelOffset = 8" is no Problem. But Playback only with Marshal.Copy to direct to the Output Buffer does not work. I think because "asioOut.InputChannelOffset = 8" only works for Recording. Is there a Solution / Workaround?

Jens

New Post: Multichannel ASIO Input Playback

$
0
0
I found out, that InputChannelOffset is also working for Playback. So that is not the Poblem of hearing no sound. I tried to AddSamples direct to a BufferedWaveProvider. Now I heard a Sound, but very distortet. I don't understand that, because recording and playback works without a Problem.

New Post: How to avaoid [deprecated] compiler warnings on IWavePlayer.Volume ?

$
0
0
(First of it all, congrats to this project, not just the code, also the support for all the years i found)

Now, here is my question:
I create a simple audio chat application and want setup the end-audio-volume (on the headphones) for the user. This means setup the volume for the incoming mic wave data from the remote side(not changing the mic himself on the other side). I use Waveout and BufferedWaveProvider to get incoming buffers and make it hearable.

I failed to use the SampleChannel class(based on the examples), no effect here.
Now i use IWavePlayer.Volume but i got depricated warnings to use the volume on the WaveProvider. The problem is: I can not find any property to do that in the BufferedWaveProvider(IWaveProvider) i use.

Any advise whats the strategy now?

*Sebastian

New Post: Plot by Time

$
0
0
I am new to Naudio. What I want to achieve is fairly straightforward. I want to plot a waveform against time in seconds where each second is divided evenly by 30 along the x-axis. Any tutorials or examples are appreciated.

Once I get this far, I will likely need help figuring out my next step...

New Post: MidiIn device Number problems

$
0
0
Hi, I'm new with audio and NAudio. I have connectd to my PC a Roland JDXi synthesizer.
Using MidiIn I got how many devices are connected (1 obviously).
But to open the device I need the device number. How to get this number?
Thanks in advance.
UmbertoR

Created Unassigned: Change MaxProductNameLength from 32 to 64 [16511]

$
0
0
It seems to bee
NAudio.Wave.WaveInCapabilities.MaxProductNameLength = 32;
is not long enough in some situations.

If you want to display this to the user then it looks a bit strange.
thanks for reading this.

*Sebastian



Commented Unassigned: Change MaxProductNameLength from 32 to 64 [16511]

$
0
0
It seems to bee
NAudio.Wave.WaveInCapabilities.MaxProductNameLength = 32;
is not long enough in some situations.

If you want to display this to the user then it looks a bit strange.
thanks for reading this.

*Sebastian


Comments: It is not possible to change this value. It's part of the Windows SDK. It's a very frustrating and long-standing issue with the old waveIn APIs. There are various workarounds to try to get hold of the non-truncated device names, but nothing that always works.

Commented Unassigned: Change MaxProductNameLength from 32 to 64 [16511]

$
0
0
It seems to bee
NAudio.Wave.WaveInCapabilities.MaxProductNameLength = 32;
is not long enough in some situations.

If you want to display this to the user then it looks a bit strange.
thanks for reading this.

*Sebastian


Comments: Thanks for the explanation :) [closed] *Sebastian

New Post: 24 bit to 32 bit

$
0
0
My Zoom R-16 interface is sampling with a bit-depth of 24 bit, but the driver is erroneously setting the AsioSampleType to Int32LSB. It works, but the audio is very low (i guess because it is treating the 24 bit as 32 bit) - how can i amplify it up? I tried both bitshifting the int 8 to the left, and using the code from the AsioSampleType.Int24LSB-case (AsioAudioAvailableEventArgs.cs), but it only creates noise.

Created Unassigned: Convert 6-channel .WAV file to .OGG issue. [16512]

$
0
0

I have some 6-channel .WAV files and used oggenc to convert it to ogg. After this conversion, the 6th channel was corrupted and not audible. I have tried SOX, FFMPEG, all got the same results.

Maybe this is because the encoder assumes that 6 channels means a 5.1 surround audio and creates one Low Frequency Effect (LFE) channel.

How to avoid this? I need a 6-channel ogg file (without a LFE track).
Thanks for your help.

Commented Unassigned: Convert 6-channel .WAV file to .OGG issue. [16512]

$
0
0

I have some 6-channel .WAV files and used oggenc to convert it to ogg. After this conversion, the 6th channel was corrupted and not audible. I have tried SOX, FFMPEG, all got the same results.

Maybe this is because the encoder assumes that 6 channels means a 5.1 surround audio and creates one Low Frequency Effect (LFE) channel.

How to avoid this? I need a 6-channel ogg file (without a LFE track).
Thanks for your help.
Comments: I'm afraid I don't know why this is - I don't really have any experience with surround audio. You are more likely to get an answer asking on the sox or ffmpeg forums.
Viewing all 5831 articles
Browse latest View live


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