Coder Social home page Coder Social logo

lincollincol / pcm-decoder Goto Github PK

View Code? Open in Web Editor NEW
6.0 0.0 3.0 866 KB

Decode audio form PCM to MP3

License: Apache License 2.0

Java 0.34% CMake 0.12% C++ 2.50% C 81.89% Makefile 12.67% Shell 2.19% Objective-C 0.29%
pcm mp3 android convert decode encode android-library androidx audio audio-processing audio-formats library audio-library lib lamemp3 lame

pcm-decoder's Introduction

PCM-Decoder - decode audio form PCM to MP3

GitHub release (latest by date) GitHub GitHub followers GitHub stars GitHub forks

Example

PCMDecoder.encodeToMp3(
    "/storage/emulated/0/Music/pcm_file.pcm",     // Input PCM file
    1,                                            // Number of channels
    96000,                                        // Bit rate
    22000,                                        // Sample rate
    "/storage/emulated/0/Music/decoded_audio.mp3" // Output MP3 file
);

Download

Gradle

allprojects {
  repositories {
    maven { url 'https://jitpack.io' }
  }
}
dependencies {
  implementation 'com.github.lincollincol:PCM-Decoder:1.0'
}

Maven

<repositories>
  <repository>
    <id>jitpack.io</id>
    <url>https://jitpack.io</url>
  </repository>
</repositories>
<dependency>
  <groupId>com.github.lincollincol</groupId>
  <artifactId>PCM-Decoder</artifactId>
  <version>1.0</version>
</dependency>

WARNING

PCM-Decoder process audio in the main thread ! You can run PCM-Decoder with RxJava, Kotlin coroutines and Java Threads to process audio in the background therad.

PCM-Decoder don't process audio in the background thread because of :

  • You can use your own approach to work in the background thread. It makes PCM-Decoder library more flexible.
  • Reduce library size. Third-party library uses a lot of space and PCM-Decoder delegates this task to user.

Based on this project

Feedback

[email protected]

License

   Copyright 2020 lincollincol

   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
   You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.