MCPcopy Index your code
hub / github.com/adrielcafe/AndroidAudioConverter

github.com/adrielcafe/AndroidAudioConverter @0.0.8

Chat with this repo
repository ↗ · DeepWiki ↗ · release 0.0.8 ↗ · + Follow
34 symbols 73 edges 7 files 0 documented · 0%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Android Arsenal Release

AndroidAudioConverter

Convert audio files inside your Android app easily. This is a wrapper of FFmpeg-Android-Java lib.

Supported formats: * AAC * MP3 * M4A * WMA * WAV * FLAC

Lib size: ~9mb

How To Use

1 - Add these permissions into your AndroidManifest.xml and request for them in Android 6.0+

<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>

2 - Load the lib inside your Application class

public class App extends Application {
    @Override
    public void onCreate() {
        super.onCreate();
        AndroidAudioConverter.load(this, new ILoadCallback() {
            @Override
            public void onSuccess() {
                // Great!
            }
            @Override
            public void onFailure(Exception error) {
                // FFmpeg is not supported by device
            }
        });
    }
}

3 - Convert audio files async

File flacFile = new File(Environment.getExternalStorageDirectory(), "my_audio.flac");
IConvertCallback callback = new IConvertCallback() {
    @Override
    public void onSuccess(File convertedFile) {
        // So fast? Love it!
    }
    @Override
    public void onFailure(Exception error) {
        // Oops! Something went wrong
    }
};
AndroidAudioConverter.with(this)
    // Your current audio file
    .setFile(flacFile)  

    // Your desired audio format 
    .setFormat(AudioFormat.MP3)

    // An callback to know when conversion is finished
    .setCallback(callback)

    // Start conversion
    .convert();

Import to your project

Put this into your app/build.gradle:

repositories {
  maven {
    url "https://jitpack.io"
  }
}

dependencies {
  compile 'com.github.adrielcafe:AndroidAudioConverter:0.0.8'
}

Dependencies

Want to RECORD AUDIO into your app?

Take a look at AndroidAudioRecorder! Example of usage here.

License

The MIT License (MIT)

Copyright (c) 2016 Adriel Café

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

Extension points exported contracts — how you extend this code

ILoadCallback (Interface)
(no doc) [3 implementers]
lib/src/main/java/cafe/adriel/androidaudioconverter/callback/ILoadCallback.java
IConvertCallback (Interface)
(no doc) [3 implementers]
lib/src/main/java/cafe/adriel/androidaudioconverter/callback/IConvertCallback.java

Core symbols most depended-on inside this repo

onFailure
called by 7
lib/src/main/java/cafe/adriel/androidaudioconverter/callback/ILoadCallback.java
onSuccess
called by 2
lib/src/main/java/cafe/adriel/androidaudioconverter/callback/ILoadCallback.java
requestPermission
called by 2
app/src/main/java/cafe/adriel/androidaudioconverter/sample/Util.java
isLoaded
called by 1
lib/src/main/java/cafe/adriel/androidaudioconverter/AndroidAudioConverter.java
load
called by 1
lib/src/main/java/cafe/adriel/androidaudioconverter/AndroidAudioConverter.java
with
called by 1
lib/src/main/java/cafe/adriel/androidaudioconverter/AndroidAudioConverter.java
setFile
called by 1
lib/src/main/java/cafe/adriel/androidaudioconverter/AndroidAudioConverter.java
setFormat
called by 1
lib/src/main/java/cafe/adriel/androidaudioconverter/AndroidAudioConverter.java

Shape

Method 27
Class 4
Interface 2
Enum 1

Languages

Java100%

Modules by API surface

lib/src/main/java/cafe/adriel/androidaudioconverter/AndroidAudioConverter.java15 symbols
app/src/main/java/cafe/adriel/androidaudioconverter/sample/MainActivity.java5 symbols
app/src/main/java/cafe/adriel/androidaudioconverter/sample/App.java4 symbols
lib/src/main/java/cafe/adriel/androidaudioconverter/callback/ILoadCallback.java3 symbols
lib/src/main/java/cafe/adriel/androidaudioconverter/callback/IConvertCallback.java3 symbols
lib/src/main/java/cafe/adriel/androidaudioconverter/model/AudioFormat.java2 symbols
app/src/main/java/cafe/adriel/androidaudioconverter/sample/Util.java2 symbols

For agents

$ claude mcp add AndroidAudioConverter \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page