Giter Site home page Giter Site logo

ruichen0101 / linux_audio_decoder_and_player Goto Github PK

View Code? Open in Web Editor NEW
10.0 0.0 4.0 22 KB

simple linux audio interface using ffmpeg and alsa

License: MIT License

CMake 10.21% C++ 89.79%
ffmpeg libav cpp cpp17 alsa linux pcm audio audio-player

linux_audio_decoder_and_player's Introduction

linux_audio_decoder_and_player

This is a small linux audio playback example using FFmpeg and alsa.

Compilation

This project use cmake to compil, make sure you have FFmpeg/libav and libasound installed. Default c++ version is c++17 but I think th other version would work fine.

cmake .
make
build/decode_and_play {path_to_audio_file}

Classes

Decoder

  • PcmReader: read pcm data from the file and pass data to player.
  • FFmpegDecoder: decode audio file and output pcm data to player.

Player

  • PcmDumper: Dump pcm data from the decoder to file.
  • AlsaPlayer: Play pcm data using alsa interface.

Tested format

  • wav
  • mp3
  • m4a
  • aiff

License

This library is released under the MIT License. All included dependencies have been released under identical or similarly permissive licenses. Please note though that FFmpeg, which you will need to build this library, is not released under MIT License. Depending on how you build it, it is either LGPL or GPL. So if you use the GPL-version of FFmpeg in your project, this library will be GPL too.

linux_audio_decoder_and_player's People

Contributors

ruichen0101 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

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.