Questions tagged [naudio]

NAudio is an open source audio library for .NET, supporting audio playback, recording and sample manipulation as well as reading and writing various audio file formats.

NAudio is an open source .NET audio and MIDI library, containing dozens of useful audio related classes intended to speed development of audio related utilities in .NET. It has been in development since 2002 and has grown to include a wide variety of features. While some parts of the library are relatively new and incomplete, the more mature features have undergone extensive testing and can be quickly used to add audio capabilities to an existing .NET application. NAudio can be quickly added to your .NET application using NuGet.

Features:

  • Play back audio using a variety of APIs
  • WaveOut
  • DirectSound
  • ASIO
  • WASAPI (Windows Vista and above)
  • Decompress audio from different Wave Formats
  • MP3 decode using ACM or DMO codec
  • AIFF
  • G.711 mu-law and a-law
  • ADPCM
  • G.722
  • Speex (using NSpeex)
  • SF2 files
  • Decode using any ACM codec installed on your computer
  • Record audio using WaveIn, WASAPI or ASIO
  • Read and Write standard .WAV files
  • Mix and manipulate audio streams using a 32 bit floating mixing engine
  • Extensive support for reading and writing MIDI files
  • Full MIDI event model
  • Basic support for Windows Mixer APIs
  • A collection of useful Windows Forms Controls
  • Some basic audio effects, including a compressor

Official Website: http://naudio.codeplex.com/

Official Website on github: https://github.com/naudio/NAudio

Useful Links:

FAQ:

1557 questions
0
votes
1 answer

finalize IWavePlayer NAudio c++

I am using NAudio to play music in my c++ app in VS2010: waveOutDevice = gcnew WaveOut(); volumeStream = gcnew WaveChannel32(gcnew Mp3FileReader("C:\\file.mp3")); mainOutputStream =…
iamnp
  • 510
  • 8
  • 23
0
votes
1 answer

Data length in PCM Wave file using MemoryStream with WaveFileWriter

Scenario: I am using NAudio 1.5 and I am trying to record a Sinus wave from an IWaveProvider in format PCM, 8bit, 22050hz like this: Private Sub record(ByVal waveForm As String, _ ByVal duration As Integer, _ …
Dynamicbyte
  • 541
  • 1
  • 5
  • 13
0
votes
1 answer

NAudio and DirectSound issue with calling Read method

I have a MoveTo method which moves a cursor in my own WaveProvider class. I implemented a Phase Vocoder in this class, so when I move a cursor I need to recreate some objects with new values. There is no problem with WaveOut, but when I use…
apocalypse
  • 5,764
  • 9
  • 47
  • 95
0
votes
1 answer

NAudio - How to Record from left or right channel only?

I need to record simultaneously from two sources, one connect to the left channel of my mic, the other connect to right. Possible to do that with NAudio ?
Dale
  • 1
  • 1
0
votes
3 answers

How can I convert an 8bit unsigned wave file, to an 8bit signed wave file?

I'm using NAudio with C# to convert wave files to 48,000, 8bit, Mono. I'm storing the converted data in a byte array. My code is below. It works fine, but the new wave file data is unsigned, and I need it to be signed. WaveFormat target = new…
user1561302
  • 81
  • 2
  • 5
0
votes
1 answer

NAudio streaming voice chat c#

I am very beginner with voice steaming I try to build a Voice Chat application I conclude : I should use UPD as ProtocolType in socket I should use NAudio streaming The send mechanism (pseudo code): private void but_Click(object sender,…
motaz99
  • 471
  • 3
  • 8
  • 15
0
votes
0 answers

MP3 splitting - output files don't have correct file info

I have successfully used code from following SO question: NAudio to split mp3 file to split some test MP3s. The input file has constant bitrate 198kbps. The debug shows, that splitting occurs at correct time (each 120 seconds). The problem is, that…
jnovacho
  • 2,825
  • 6
  • 27
  • 44
0
votes
1 answer

NAudio volume in ASIO

If I wanna change output volume I should not use IWavePlayer.Volume property right? I should just change (multiply by factor) output samples in WaveProvider right? OK, it is fine for WaveOut and DirectSoundOut because you can control them from…
apocalypse
  • 5,764
  • 9
  • 47
  • 95
0
votes
1 answer

NAudio directSound.stop issue (?)

Why is one more data chunk fetched from WaveProvider after I call Stop on DirectSoundOut? It happens even after a pause. I am using NAudio 1.5.
apocalypse
  • 5,764
  • 9
  • 47
  • 95
0
votes
1 answer

Mute feature in NAudio (waveOut)

How to mute a WaveOut? I know I can save current volume to variable, then set Volume to 0f. To unmute I just read that saved variable. However in Windows Volume Control panel it not shows "mute icon". Is any way to mute output just telling it to…
apocalypse
  • 5,764
  • 9
  • 47
  • 95
0
votes
1 answer

Play an M3U or PLS file

I really need to be able to play an M3U or PLS file from C#. I'm trying to play these files because I am creating an Internet radio application and many Internet Radio Stations provide you these type of files to be opened using iTunes, Winamp and so…
Valentin Radu
  • 629
  • 1
  • 11
  • 26
0
votes
1 answer

Audio level while recording in silverlight 5

Hi I am recording PCM audio in a web application using silverlight 5 and I wanted to know is there any way that we can show the audio level like how we do on NAUDIO. I am not able to use Naudio with silverlight. This is so that the user knows that…
wizgot
  • 338
  • 3
  • 11
0
votes
3 answers

Play (invalid) audio stream with NAudio

I've got a DLink web cam (DCS-932L) that stream video and audio via http. The video is mjpeg (motion jpeg) while audio is 16 bit PCM wav audio in mono. I'm able to read the show the video stream fine, but I'm having issues with the audio. According…
Paaland
  • 682
  • 1
  • 10
  • 25
0
votes
2 answers

How to get the right sound (stereo) from a raw 16bit, 44100hz, stereo LPCM

I'm using libspotify to retrieve music to play with some audio library. The spotify music should be in raw 16bit, 44100hz, stereo LPCM. I have been trying to play the music with NAudio, but unfortunatly it's not in stereo. From spotify docs:…
Søren Randrup
  • 318
  • 2
  • 19
0
votes
1 answer

NAudio in MVC, how do i can give file path through file uploader? other option?

I am using NAudio to convert my mp3 file to waveform image, for this i am using file uploader so user can select their mp3 file and can upload the wave image in particular location in server. If i hard code…
manny
  • 1,878
  • 2
  • 15
  • 31
1 2 3
99
100