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

New Post: No driver calling acmFormatSuggest follows to class not registered issue and 32bit vs 64 bit

$
0
0

Hi there,

I have a remote REST web service hosted on a 3rd party hosting provider.

The WCF service method takes in a Stream. The stream is always an mp3, passed through from an iPhone app.

I need to convert the stream back into a wav file. i can do this on my local machine fine but obviously not having access to the remote servers i cannot install a codec on the machine.

So i found this (changed to DmoMp3FrameDecompressor) thread here, and duly recompiled my NAudio and republished. Now i get a different error:

Retrieving the com class factory for component with CSLID bbeea841-0a63-4f52-a7ab-a9b3a84ed38 etc etc

This has something to do with 64 bit vs 32 bit according to this here. so i changed, as suggested both my service and naudio build platform target to x86. I recompiled NAudio and republished the service.

IT STILL DOESNT WORK! im not sure if its my host who doesnt have the DirectX Media Object or what the story is. I found this post here which suggested the 32 bit process, but im not sure what to do next?

What can i do? is it easier to plead with the host to install the ACM codec? if so which one? ive heard installing the codec on the windows server 2008 box doesnt work, so how can i do this?

 


New Post: No driver calling acmFormatSuggest follows to class not registered issue and 32bit vs 64 bit

$
0
0

Hi Mark,

Ive struggled the entire day with this issue. Is it worth me asking my host to install the Msacm32.dll or whatever else is needed? would installing windows media player on the server do the trick?

New Post: No driver calling acmFormatSuggest follows to class not registered issue and 32bit vs 64 bit

$
0
0

I've chatted to my host, who have said they will not install anything obviosuly being a shared web server. The other option is to reference this dll in the bin folder, although im not sure if its possible to do dllimports like this, or if this would even work. Have you got any other ideas as to how i could simply decode an mp3 stream into a wav stream?

New Post: No driver calling acmFormatSuggest follows to class not registered issue and 32bit vs 64 bit

$
0
0

If the ACM codec or the DMO object aren't installed then your only option would be a fully managed MP3 decoder. I actually made one, available at nlayer.codeplex.com, but the interface needs to be cleaned up a bit before it is easy to use.

Mark

New Post: Start/End Position to play subclip?

$
0
0

yes, creating your own WaveStream / IWaveProvider is the way to go. You would pass in a source stream to the constructor, and then in the Read method just read from the section of the source stream you want to. For looping, you would need to reposition the source stream once you have read up to the ned position. Have a look at LoopStream.cs in NAudioDemo to see looping in action. You would just need to change where it repositions to, and how it decides when it has got to the end.

Mark

New Post: Using NAudio.GUI.WaveViewer

$
0
0

they do both use slightly different ways of drawing the waveform. There is no reason why you couldn't make a WPF one that uses the same tehcnique as waveFormPainter (which just draws vertical lines representing the loudest sample out of the samples for that pixel).

New Post: ASIO drivers

$
0
0

have you tried using the ASIOOut class? This is intended to hide the complexity of these C# wrappers from the user

Updated Wiki: Home

$
0
0

NAudio Overview

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 2001 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 demo project showing an MP3 file playing:
naudiodemo.png

NAudio WPF Project showing waveform visualisation and spectrum analyser:
NAudioWPF.png

Latest News

For the latest news and more documentation on NAudio, visit Mark Heath's blog.
  • 20 Apr 2011 NAudio 1.4 Released. Read the release notes
  • 15 Apr 2011 NAudio demo now shows how to select output devices (for WaveOut, DirectSound, WASAPI and ASIO), and can play 8 bit, 16 bit, 24 bit, and 32 bit float WAV files. Fixed a longstanding ASIO issue.
  • 7 Nov 2010 Major improvements to Mp3FileReader
  • 10 Oct 2009 Version 1.3 Released. Read the release notes
  • 20 Sep 2009 We are getting close to feature complete for 1.3. Last chance to get in any feedback on the API
  • 26 Aug 2009 WPF Waveform drawing demo project including FFT added
  • 28 Feb 2009 Lots of new stuff is being added and planned, so do check out the Source Code tab to have a sneak peak at what's coming in 1.3
  • 26 June 2008 Version 1.2 Released. Read the release notes

NAudio Features

  • Play back audio using a variety of APIs
    • WaveOut
    • DirectSound
    • ASIO (not currently working with all soundcards)
    • WASAPI (Windows Vista Core Audio)
  • 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 or WASAPI
  • 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

Projects Using NAudio

NAudio currently is used to support a number of audio related utilities, some of which may be moved to be hosted on CodePlex in the future. If you have used NAudio for a project, please get in touch so we can post it here.

More Info

For more information, please visit the NAudio Documentation Wiki

Donate

NAudio is a free open source project that is developed in personal time. You can show your appreciation for NAudio and support future development by donating.
Donate

New Post: Audio doesn't work over network

$
0
0

does the NAudioDemo app not work? Can you debug to see if the BufferedWaveProvider is filling up with data?

New Post: When playback ends?

$
0
0

Hi, I play a wav file. How do I know, when it ends? I mean, I must do some action when playback is over, but user didn't stopped it manually.

New Post: When playback ends?

$
0
0

the WaveOut class (and the others) have a PlaybackStopped event you can wait for

New Post: When playback ends?

$
0
0

PlaybackStopped occurs only after Stop() method.

New Post: When playback ends?

$
0
0

what version of NAudio are you using? It may well be different in the latest as I did some work on PlaybackFinished for 1.5 a while ago.

Mark

New Post: When playback ends?

$
0
0

My version is 1.4. Is 1.5 stable?

New Post: When playback ends?

$
0
0

1.5 isn't released yet, but will be very close to what is already in source control.

Mark


New Post: NAudio NullReferenceException when using a Start/Stop button

$
0
0

Crosspost from here: http://stackoverflow.com/questions/8461941/naudio-nullreferenceexception-when-using-a-start-stop-button

I have a GUI form with a checkbox button for Start/Stop. When the program starts, clicking Start and Stop works once. When I try and click Start again after I stop the recording, I get a NullReferenceException:

 

An unhandled exception of type 'System.NullReferenceException' occurred in NAudio.dll

Additional information: Object reference not set to an instance of an object.

 

at this line in my Program.cs file:

 

Application.Run(new GUI());

Here is my Start/Stop button in my GUI form:

    public GUI()
    {
        InitializeComponent();
        InitializeAudio();
    }

    private void btnStartStop_CheckedChanged(object sender, EventArgs e)
    {
        if (btnStartStop.Checked)
        {
            waveInDevice.StartRecording();
            waveOutDevice.Play();
            btnStartStop.Text = "Stop";
        }
        else
        {
            btnStartStop.Text = "Start";
            waveInDevice.StopRecording();
            waveOutDevice.Stop();
        }
    }

    private void InitializeAudio()
    {
        buffer = new BufferedWaveProvider(waveInDevice.WaveFormat);
        buffer.DiscardOnBufferOverflow = true;
        waveInDevice.DataAvailable += new EventHandler<WaveInEventArgs>(waveInDevice_DataAvailable);
        waveOutDevice.Init(buffer);
    }

Could anyone have any advice as to why this is happening?

New Post: When playback ends?

$
0
0

So is there any way in 1.4 to check if playback is finished, or we just have to wait? :)

New Post: When playback ends?

$
0
0

easiest option is for you to get latest from source control and build your own version. lots of bug fixes and improvements since 1.4

New Post: No driver calling acmFormatSuggest follows to class not registered issue and 32bit vs 64 bit

$
0
0

Thank you Mark,

Ill give that a go!

New Comment on "MP3"

$
0
0
Hello, I am from China, my English is not very good, I think I need your help, and I need some help, I want to change the format of audio files The original audio file format Bit rate 256Kbps The audio sample size 16 Audio sampling level 16KHZ Audio formats PCM Convert to Bit rate 64Kbps The audio sample size 8 Audio sampling level 8KHZ Audio formats CCITT A-Law However, I met some problems, abnormal system prompts the Naudio.MmException AcmNotPossible calling acmStreamOpen I test code is such NAudio.Wave.WaveFormat format = NAudio.Wave.WaveFormat.CreateALawFormat ( 8000, 1); Try { NAudio.Wave.WaveFileReader fileread = new WaveFileReader ( @" E: \ 1.wav" ); NAudio.Wave.WaveStream WaveStream = new WaveFormatConversionStream ( format, fileread ); NAudio.Wave.WaveFileWriter.CreateWaveFile ( @" E: \ 2.wav", WaveStream ); Console.WriteLine (" OK" ); } Catch ( ExecutionEngineException Ex ) { Console.WriteLine ( ex.ToString ( ) ); } Console.ReadKey ( ); Excuse me, what is wrong.
Viewing all 5831 articles
Browse latest View live


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