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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T13:19:29+00:00 2026-05-26T13:19:29+00:00

Im trying to open an mp3 in soundpool via an id with load, ive

  • 0

Im trying to open an mp3 in soundpool via an id with load, ive also tried doing it via a file descriptor.

I always get the same exception:

This file can not be opened as a file descriptor; it is probably compressed

Why is my mp3 being compressed?

Here is the soundpool code:

mySoundPool = new SoundPool(10, AudioManager.STREAM_MUSIC, 0);
try { mySoundPool.load(this, R.raw.drum, 1);
   } catch (Exception e) {
        // TODO Auto-generated catch block
        e.printStackTrace();
        Log.e(TAG, "", e);
    }
  • 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-26T13:19:30+00:00Added an answer on May 26, 2026 at 1:19 pm

    MP3 is a compressed file format, so your MP3 file is already compressed. As wikipedia says:

    MP3, is a patented digital audio encoding format using a form of lossy
    data compression

    This Stackoverflow question suggests that you should use WAV or OGG support on Android, and offers an alternative way of playing MP3s.

    The SoundPool API docs do imply MP3 support, so I’m not sure what is going wrong here. I suggest you try testing with some other MP3 files, and also test converting your existing MP3 to WAV/OGG formats to test that too.

    You’ll need to rename it as Android resources don’t include the file extension. Make sure you check if you have another file in res\raw with the same name but a different file extension, as that could cause problems.

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

Sidebar

Related Questions

I am trying to open any arbitrary file using Intents. However, I get the
im trying to open a file using StreamReader and ive to set a Encoding,
I am trying to get an audio mp3 file from a server and play
I am trying open a very large file in Emacs and it fails to
I'm trying to open a file for input in Excel with this line :
I'm trying to open a zip file with jython using FileInputStream and ZipInputStream. But
I'm trying to open a JSON file from the assets folder with an InputStream
I'm trying to open a file and read from the last point read. My
I'm trying to open a file in Openoffice from terminal and to automatically replace
If you open an mp3 url in the Android's browser, you get a Complete

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.