{"id":15346671,"url":"https://github.com/centic9/commons-audio","last_synced_at":"2025-04-14T23:36:18.305Z","repository":{"id":57739275,"uuid":"255387600","full_name":"centic9/commons-audio","owner":"centic9","description":"A small library of code-pieces that I find useful when developing tools and applications around handling of audio, playing sound, downloading audio from certain websites","archived":false,"fork":false,"pushed_at":"2025-04-05T07:54:50.000Z","size":2635,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-05T08:25:49.411Z","etag":null,"topics":["audio-library","java-sound","java-sound-api","sound-player","tarsosdsp"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-2-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/centic9.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"centic9"}},"created_at":"2020-04-13T16:52:13.000Z","updated_at":"2025-04-05T07:54:53.000Z","dependencies_parsed_at":"2023-11-26T12:22:36.732Z","dependency_job_id":"e38d132b-12a1-4c5c-802a-62b98fa57c5a","html_url":"https://github.com/centic9/commons-audio","commit_stats":{"total_commits":273,"total_committers":2,"mean_commits":136.5,"dds":0.04395604395604391,"last_synced_commit":"ef9999fbcc6494843843822f03a5e3c838931d6b"},"previous_names":[],"tags_count":31,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/centic9%2Fcommons-audio","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/centic9%2Fcommons-audio/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/centic9%2Fcommons-audio/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/centic9%2Fcommons-audio/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/centic9","download_url":"https://codeload.github.com/centic9/commons-audio/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248980713,"owners_count":21193136,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["audio-library","java-sound","java-sound-api","sound-player","tarsosdsp"],"created_at":"2024-10-01T11:25:56.145Z","updated_at":"2025-04-14T23:36:18.289Z","avatar_url":"https://github.com/centic9.png","language":"Java","funding_links":["https://github.com/sponsors/centic9"],"categories":[],"sub_categories":[],"readme":"[![Build Status](https://github.com/centic9/commons-audio/actions/workflows/gradle-build.yml/badge.svg)](https://github.com/centic9/commons-audio/actions)\n[![Gradle Status](https://gradleupdate.appspot.com/centic9/commons-audio/status.svg?branch=master)](https://gradleupdate.appspot.com/centic9/commons-audio/status)\n[![Release](https://img.shields.io/github/release/centic9/commons-audio.svg)](https://github.com/centic9/commons-audio/releases)\n[![GitHub release](https://img.shields.io/github/release/centic9/commons-audio.svg?label=changelog)](https://github.com/centic9/commons-audio/releases/latest)\n[![Tag](https://img.shields.io/github/tag/centic9/commons-audio.svg)](https://github.com/centic9/commons-audio/tags)\n[![Maven Central](https://maven-badges.herokuapp.com/maven-central/org.dstadler/commons-audio/badge.svg?style=flat)](https://maven-badges.herokuapp.com/maven-central/org.dstadler/commons-audio) \n[![Maven Central](https://img.shields.io/maven-central/v/org.dstadler/commons-audio.svg)](https://maven-badges.herokuapp.com/maven-central/org.dstadler/commons-audio)\n\nThis is a small library of code-pieces that I find useful when developing tools and applications around handling of\naudio, playing sound, downloading audio from certain websites, ...\n\n## Contents\n\nHere an (incomplete) list of bits and pieces in this lib:\n* A simple AudioPlayer interface and implementations via JLayer, MP3/OGG-SPI and TarsosDSP libraries\n* Interfaces for buffering audio data in a flexible SeekableRingBuffer\n* Downloading ranges of audio-streams from local files or HTTP\n* Accessing information about sessions of the Austrian radio station FM4\n* An implementation of the SeekableRingBuffer which also provides persisting to disk\n* A system for playing sound at different tempo via the TarsosDSP libraries for stretching/condensing audio on-the-fly\n* A basic Stream class for holding information about streams that are played\n* Extensions to PipedInputStream which help with clearing and flushing the internal buffer\n\nThere is also a simple commandline audio-player `ExamplePlayer` which shows how to use the components to\nprovide proper buffered playback of audio from either local files or audio streams fetched via HTTP.   \n\n## Usage\n\nThe SeekableRingBuffer and it's implementations are at the core of some of my audio applications, \nthey allow to have a full-featured ring-buffer for audio-data in the application and for example \nhave one thread fetch the audio data from somewhere, e.g. from a file or from an HTTP download or a\nlive stream of some radio-station. Another thread can read from the stream and handle sending the audio\nto the local player. \n\nThis way fetching the audio-data and playing it are nicely decoupled with flexible \nbuffering which not only allows playing the live audio (with only a small lag), but also allows to \nskip forward and backwards in the buffered audio.\n\nReading will wait if the buffer is full, i.e. if reading is faster than writing (which it usually should be).\n\nFor live-streams, naturally reading will be as fast as playing, but previously read data will still be available\nfor skipping backwards.\n\nWriting will wait for new data if the buffer is empty, i.e. if writing is faster, which may indicate some problem\nwith the stream or a slow internet connection.\n\nVia this buffering and the support for playing audio at different speed you can build some very powerful\napplications, e.g. playing a radio-station, but allowing the user to skip forward/backward, e.g. to skip\nacross ads or if the content is not interesting.\n\nYou can play the audio a bit slower if the play-position is near the \"head\" of the buffer or playing a bit \nfaster if the play position is at the \"tail\", thus ensuring that over time there is always some buffer\navailable for skipping back and forward a few minutes.\n\n## Using it\n\n### Add it to your project as Gradle dependency\n\n    compile 'org.dstadler:commons-audio:1.+'\n\n## Change it\n\n### Grab it\n\n    git clone git://github.com/centic9/commons-audio\n\n### Build it and run tests\n\n\tcd commons-audio\n\t./gradlew check jacocoTestReport\n\n### Release it\n\n    ./gradlew --console=plain release \u0026\u0026 ./gradlew closeAndReleaseRepository\n    \n* This should automatically release the new version on MavenCentral\n* Afterwards go to the [Github releases page](https://github.com/centic9/commons-audio/releases) and add release-notes\n\n## Support this project\n\nIf you find this library useful and would like to support it, you can [Sponsor the author](https://github.com/sponsors/centic9)\n\n## Licensing\n\n* commons-audio is licensed under the [BSD 2-Clause License].\n\n[BSD 2-Clause License]: https://www.opensource.org/licenses/bsd-license.php\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcentic9%2Fcommons-audio","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcentic9%2Fcommons-audio","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcentic9%2Fcommons-audio/lists"}