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 6992039
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T19:35:00+00:00 2026-05-27T19:35:00+00:00

About a year ago I started to built an application for android. Now when

  • 0

About a year ago I started to built an application for android.
Now when I try to run it I get an exception about AudioInputStream class, After a short research that I did using GOOGLE I found out that android doesn’t support this class anymore…
Is their any alternative for it?

This is the code that I wrote:

    private void merge2WavFiles(String wavFile1, String wavFile2, String newWavFilePath) {

    try {
        File wave1 = new File(wavFile1);
        if(!wave1.exists())
            throw new Exception(wave1.getPath() + " - File Not Found");
        AudioInputStream clip1 = AudioSystem.getAudioInputStream(wave1);
        AudioInputStream clip2 = AudioSystem.getAudioInputStream(new File(wavFile2));

        AudioInputStream emptyClip = 
            AudioSystem.getAudioInputStream(new File(emptyWavPath));            

        AudioInputStream appendedFiles = 
            new AudioInputStream(
                    new SequenceInputStream(clip1, emptyClip),
                    clip1.getFormat(),
                    clip1.getFrameLength() + 100
                    );

        clip1 = appendedFiles;

        appendedFiles = 
            new AudioInputStream(
                    new SequenceInputStream(clip1, clip2),
                    clip1.getFormat(),
                    clip1.getFrameLength() + clip2.getFrameLength()
                    );

        AudioSystem.write(appendedFiles, AudioFileFormat.Type.WAVE, new File(newWavFilePath));
    } catch (Exception e) {
        e.printStackTrace();
    }
}
  • 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-05-27T19:35:01+00:00Added an answer on May 27, 2026 at 7:35 pm

    I also have similar problems to yours while developing a frequency generating methods set on android, so I digged everywhere alot in the APIs of android references and java se 1.7 docs. But there do not exist easily-exchangeable alternatives of class AudioInputStream and even also class AudioSystem found in your code.
    If you want use your legacy you may have to revise and refactor several items. In my cases, I used InputStream and ByteArrayInputStream (java.io) for that, and recording and systematic some actions will be managed by AudioRecord and AudioManager (android.media). Note that AudioFormat in android and java7 are different its internal characteristics. If I cleared my issues upon the audio manipulation, I will attach a piece of sample code for you.

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

Sidebar

Related Questions

I built a Django application for a client about a year ago. He has
I switched to the dvorak keyboard layout about a year ago. I now use
About half a year ago, when I started to learn Ruby and Rails, I
About half a year ago, I started digging into unit testing. I made my
I started programming in C# and ASP.NET about a year ago. When I was
About a year ago, I picked up Scott Ambler's Refactoring Databases: Evolutionary Database Design
I remember reading a post about a year or so ago by Scott Hanselman
For about a year now, I've had problems trying to send and receive email
I've been programming c++ for about a year now and when i'm looking about
I've been a professional software engineer for about a year now, having graduated with

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.