Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9017129
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T04:11:13+00:00 2026-06-16T04:11:13+00:00

I have to Compress an Audio WAV with the best codec possible using NAudio.

  • 0

I have to Compress an Audio WAV with the best codec possible using NAudio.
I use WaveFormatConversionStream, but I always get this error :
"AcmNotPossible calling acmStreamOpen"
I had read a lot of answer about this error , but I don’t find the solution.

Here’s my code,Where Am I wrong ?

All help would be nice and welcome 🙂

private void InvokeOnNewAudioData(byte[] data, AudioFormat audioFormat)
{
    WaveFormat waveFormat = new WaveFormat(audioFormat.NumberSamplesPerSec, audioFormat.NumberBitsPerSample, audioFormat.NumberChannels);

    WaveFormat targetFormat = WaveFormat.CreateCustomFormat(WaveFormatEncoding.Vorbis1,
                                                            22000, //SampleRate
                                                            audioFormat.NumberChannels,     //Channels
                                                            48000,    //Average Bytes per Second
                                                            2,     //Block Align
                                                            16);    //Bits per Sample   


    using (MemoryStream dataStream = new MemoryStream(data))
    {
        using (WaveStream inputStream = new RawSourceWaveStream(dataStream, waveFormat))
        {
            try
            {
                using (WaveFormatConversionStream converter = new WaveFormatConversionStream(targetFormat, inputStream))
                {

                }
            }
            catch (Exception)
            {
                throw;
            }
        }
    }
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T04:11:14+00:00Added an answer on June 16, 2026 at 4:11 am

    This means that there is no ACM codec on your system that can perform the requested conversion. You can use the NAudioDemo app that comes with NAudio to examine all the ACM codecs you have installed on your system and their supported input and output formats. Windows certainly doesn’t come with a Vorbis ACM codec, which is probably why your code doesn’t work. Even if you had installed a Vorbis ACM codec, you need to get the WaveFormat exactly right or you will get the ACM not possible error.

    You’d probably be better off trying to use the the NAudio support that comes with NVorbis in any case.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Possible Duplicate: HTML Compress File Upload? I have complains from client that my website
I have a problem I would like to compress all my javascript, but inside
So I have been using Minify to compress my JS and CSS which had
How can you capture Video using Java ? You have to use JMF ?
I currently have this script to compress log files: find . -name '*.log' -print0
I have a string that I would like to compress using GZip before inserting
I have a file that is created using var recordIntent = new Intent(MediaStore.Audio.Media.RecordSoundAction); I
In my project I have a requirement to compress my files using only the
I have found this code to make php file cache and compress. Below is
I'm using ICSharpCode.SharpZipLib.dll for compress and decompress data. I have the following code that

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.