• Stars
    star
    133
  • Rank 272,600 (Top 6 %)
  • Language
    Java
  • License
    GNU General Publi...
  • Created about 7 years ago
  • Updated almost 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

🌌Java Advanced Audio Controller Library (WAV, AU, AIFF, MP3, OGG VORBIS, FLAC, MONKEY's AUDIO and SPEEX audio formats )

ko-fi


Java Stream Player ( Library )

🎢

Java Audio Controller Library with (skip,skipTo,start,stop,pause,play,restart) This is the next version of JavaZoom BasicPlayer


Latest Version HitCount Patreon donate button PayPal donate button

What audio formats it supports?

  • Fully Supported βœ”οΈ
    • WAV
    • MP3
  • Partially not full tested 🚧
    • OGG VORBIS
    • FLAC
    • MONKEY's AUDIO
    • SPEEX
  • Not Supported Yet ❌
    • AAC
    • THEORA
    • ... all the others

Step 1. Add the JitPack repository to your build file

https://jitpack.io/private#goxr3plus/java-stream-player

<repositories>
	<repository>
	   <id>jitpack.io</id>
	   <url>https://jitpack.io</url>
        </repository>
</repositories>

Step 2. Add the dependency

<dependency>
   <groupId>com.github.goxr3plus</groupId>
   <artifactId>java-stream-player</artifactId>
   <version>9.0.4</version>
</dependency>

Example usage :

import java.io.File;
import java.util.Map;

import com.goxr3plus.streamplayer.enums.Status;
import com.goxr3plus.streamplayer.stream.StreamPlayer;
import com.goxr3plus.streamplayer.stream.StreamPlayerListener;
import com.goxr3plus.streamplayer.stream.StreamPlayerEvent;
import com.goxr3plus.streamplayer.stream.StreamPlayerException;

/**
 * @author GOXR3PLUS
 *
 */
public class Main extends StreamPlayer implements StreamPlayerListener {

    private final String audioAbsolutePath = "Logic - Ballin [Bass Boosted].mp3";

    /**
     * Constructor
     */
    public Main() {

        try {

            // Register to the Listeners
            addStreamPlayerListener(this);

            // Open a File
            // open(new File("...")) //..Here must be the file absolute path
            // open(INPUTSTREAM)
            // open(AUDIOURL)

            // Example
            open(new File(audioAbsolutePath));

            // Seek by bytes
            // seekBytes(500000L);

            // Seek +x seconds starting from the current position
            seekSeconds(15);
            seekSeconds(15);

            /* Seek starting from the begginning of the audio */
            // seekTo(200);

            // Play it
            play();
            // pause();

        } catch (final Exception ex) {
            ex.printStackTrace();
        }

    }

    @Override
    public void opened(final Object dataSource, final Map<String, Object> properties) {

    }

    @Override
    public void progress(final int nEncodedBytes, final long microsecondPosition, final byte[] pcmData,
            final Map<String, Object> properties) {

        // System.out.println("Encoded Bytes : " + nEncodedBytes);

        // Current time position in seconds:) by GOXR3PLUS STUDIO
        // This is not the more precise way ...
        // in XR3Player i am using different techniques .
        // https://github.com/goxr3plus/XR3Player
        // Just for demostration purposes :)
        // I will add more advanced techniques with milliseconds , microseconds , hours
        // and minutes soon

        // .MP3 OR .WAV
        final String extension = "mp3"; // THE SAMPLE Audio i am using is .MP3 SO ... :)

        long totalBytes = getTotalBytes();
        if ("mp3".equals(extension) || "wav".equals(extension)) {

            // Calculate the progress until now
            double progress = (nEncodedBytes > 0 && totalBytes > 0) ? (nEncodedBytes * 1.0f / totalBytes * 1.0f)
                    : -1.0f;
            // System.out.println(progress*100+"%");

            System.out.println("Seconds  : " + (int) (microsecondPosition / 1000000) + " s " + "Progress: [ "
                    + progress * 100 + " ] %");

            // .WHATEVER MUSIC FILE*
        } else {
            // System.out.println("Current time is : " + (int) (microsecondPosition /
            // 1000000) + " seconds");
        }

    }

    @Override
    public void statusUpdated(final StreamPlayerEvent streamPlayerEvent) {

        // Player status
        final Status status = streamPlayerEvent.getPlayerStatus();
        // System.out.println(streamPlayerEvent.getPlayerStatus());

        // Examples

        if (status == Status.OPENED) {

        } else if (status == Status.OPENING) {

        } else if (status == Status.RESUMED) {

        } else if (status == Status.PLAYING) {

        } else if (status == Status.STOPPED) {

        } else if (status == Status.SEEKING) {

        } else if (status == Status.SEEKED) {

        }

        // etc... SEE XR3PLAYER https://github.com/goxr3plus/XR3Player for advanced
        // examples
    }

    public static void main(final String[] args) {
        new Main();
    }

}

Java Audio Tutorials and API's by GOXR3PLUS STUDIO


Looking for a ffmpeg wrapper in Java ?

Check this -> jave2 , currently updating it :)


Originally being developed for XR3Player Application

Are you curious on how to make spectrum analysers in Java? Well the below tutorials plus the above code are the solution :)

I hope you enjoy these tutorials and actually you can watch the youtube videos about them below:

Java Spectrum Analyser Tutorial

More Repositories

1

XR3Player

🎧 🎼 The MOST ADVANCED JavaFX Media Player
Java
638
star
2

FX-BorderlessScene

πŸ’  Undecorated JavaFX Scene with implemented move, resize, minimise, maximise, close and Windows Aero Snap controls.
CSS
131
star
3

java-google-speech-api

πŸ™Š Speech Recognition , Text To Speech , Google Translate
Java
73
star
4

Ruby-on-Rails-eCommerce-Website

Advanced Ruby on Rails E-Commerce Website
HTML
64
star
5

Java-Speech-Recognizer-Tutorial--Calculator

πŸ‘„ Java-Speech-Recognizer-Tutorial--Calculator
Java
47
star
6

Java-Audio-Wave-Spectrum-API

Create Wave Spectrums from any Audio File using this API , written in JavaFX
Java
47
star
7

JavaFXApplicationAutoUpdater

JavaFX Smart Application Updater
Java
30
star
8

Java-Spectrum-Analyser-Tutorials

πŸ¦— Java-Spectrum-Analyser-Tutorials for Pros
Java
30
star
9

Java-Text-To-Speech-Tutorial

Java+MaryTTS=Java Text To Speech
Java
23
star
10

XR3Capture

πŸ“Έ Java Desktop Screen Capturing
Java
22
star
11

XR3Converter

Convert any audio and video fast and easy ( based on FFMPEG 4 and Jave2)
Java
21
star
12

TradingView_GoldenIndicator

πŸ“ˆ TradingView - ( Day Trading or Long Term Trading ) Indicator
JavaScript
20
star
13

java-sound-libraries

Advanced Audio Libraries for Java supporting multiple audio formats
Java
19
star
14

Java-Google-Text-To-Speech

Text To Speech [ Examples, Tutorials , Opinions ]
Java
17
star
15

Java-Google-Speech-Recognizer

Java Speech Recognition based on Google Cloud Services
Java
15
star
16

java-google-translator

Full Google Translate Support using Java
Java
10
star
17

FXChromium

🌐 JavaFX Chromium Web Browser
9
star
18

Expentour

πŸ”₯ Firebase Expenses Manager :React 16.12 , Firebase 7.6.1 , Bootstrap 4 , Babel 7.8.3 , WebPack 4.41.5
JavaScript
9
star
19

JavaFX-Chromium-Browser

JavaFX Browser based on Google Open Source Chromium
Java
8
star
20

jaudiotagger

Fake Repository in order to use JAudioTagger 2.2.6 with Gradle and Maven
Java
8
star
21

XTermReact

XTerm JS + React = awesome
CSS
8
star
22

sphinx-5-Maven-Example

Sphinx-5-Maven-Example full
Java
8
star
23

Simplest-Spring-Boot-Hello-World

Simplest Spring Boot Hello World Example
Java
8
star
24

java9-modules-tutorial

πŸ†• ( Simple Module , Optional , Transitive , Cyclic , Qualified Exports , Module Graph , Observable , Aggregator , Package Naming Conflicts , Module Resolution Process )
Java
7
star
25

React-Burger-Restaurant

πŸ” Website to order burgers made with React :)
JavaScript
7
star
26

JAVE

Updated version of JAVE from SAURONS SOFTWARE
Java
6
star
27

Java-Google-Desktop-Translator

Professional Java Google Desktop Translator
CSS
6
star
28

Ultimate-Git-Aliases

Ma personal favourite git aliases for every day coding
4
star
29

Java-GitHub-API

Java Code for using GitHub API
Java
4
star
30

JavaFX-TagsBar

This is a javaFX TagBar implementation
Java
4
star
31

MealsTour

πŸ¨πŸ‡πŸ· React Native meals application using expo SDK 37 πŸ¨πŸ‡πŸ·
JavaScript
4
star
32

MaRecipes

Search between 1.000.000 food recipes
HTML
4
star
33

JavaFX-Ikonli-Font-Icons-Tutorials

JavaFX Ikonli Font Icons Library Tutorials
4
star
34

CorruptedJarsDetector

Detect/Delete/Repair Corrupted Maven/Gradle Jars
4
star
35

React_Indecision_App

πŸ‘ What you will do next ? Let the computer decide ! Babel 7.5.5 , React 16.9.0 , WebPack 4.39.1 , SCSS 6.0.0
JavaScript
4
star
36

React-Router-V5-Tutorial

React-Router-V5-Tutorial
JavaScript
3
star
37

Learn-Enough-Git-to-Be-Dangerous-Tutorial

Learn Enough Git to Be Dangerous Tutorial
HTML
3
star
38

TopJavaLibraries

Top Java Projects Libraries based on different subjects
3
star
39

Embedded-JavaFX-Web-Browser-Example-with-Maven

Embedded JavaFX Web-Browser Example with Maven
Java
3
star
40

react-native-todo-app

πŸ‘‹ βš›οΈ React Native todo app using expo SDK 37 βš›οΈπŸ‘‹
JavaScript
3
star
41

React-Tic-Tac-Toe

πŸŽ‰ React-Tic-Tac-Toe game with style
JavaScript
3
star
42

Wikipedia-API-with-Java-Tutorials

Java
3
star
43

Java-Microphone-Audio-Spectrum-Analyzers-Tutorial

Capture Audio from Microphone and make complex spectrum analyzers
3
star
44

goxr3plus

My profile readme
3
star
45

XtremeMediaPlayer

Source code of XtremeMediaPlayer
Java
3
star
46

react-paginatorx

ReactJS pagination controller
JavaScript
2
star
47

AdvancedJavaFXTutorials

JavaFX Tutorials on Different Topics with Youtube Videos
Java
2
star
48

Java-Dropbox-API-Full-Tutorial

Java Dropbox API Full Tutorial
Java
2
star
49

Rails_Hello_App

Simple Hello_World Ruby on Rails Website
Ruby
2
star
50

Java-JavaFX-Audio-Tutorials-by-GOXR3PLUS

Amazing JavaFX Tutorials all here from years of experience with Java Audio
2
star
51

XR3PodioMatcher

Program created for AIESEC to automate finding new StartUPS process .
HTML
2
star
52

React-Redux-Basic-Example

πŸŒ€ React-Redux-Basic-Example :)
JavaScript
2
star
53

XR3TicTacToe

Wonderful Java Tic Tac Toe game for Desktop using SWING Library
Java
2
star
54

React-App

πŸŒ€ My first React website-application
JavaScript
2
star
55

dapic

Intralot Dapic
Java
2
star
56

XR3Chat

πŸ’¬Have fun using this Application for Chat!
Java
2
star
57

JavaFX-Title-Menu-Item

Title Menu Item for JavaFX ContextMenu
Java
2
star
58

PigDiceGameJS

🎲 Pig Dice Game made with Javascript
JavaScript
2
star
59

IntelliJ-to-Eclipse-Formater

Map IntelliJ Code Formater to Eclipse Code Formater
2
star
60

Java-Artificial-Intelligence-Algorithms

Breadth (BFS) , Depth (DFS) , IDDFS , A* , Hill Climbing , Stochastic , Brute Force , Tabu
Java
2
star
61

BudgetJS

πŸ’² Website to Manage your Monthly Budget :)
JavaScript
2
star
62

React_Axios_Posts

πŸŒ€ React application using axios to post and get articles
JavaScript
2
star
63

XR3ImageViewer

Allows you to view galleries of images!
Java
2
star
64

java9_samples

Java 9 new features examples
HTML
2
star
65

react-style-tutorial

Four ways to style react components
JavaScript
2
star
66

JavaFX-Chromium-Browser-Basic-Tutorial

JavaFX Chromium Browser Basic Tutorial
Java
1
star
67

jave2-problems

Will be deleted
Java
1
star
68

XR3Player-Installers

Files for XR3Player installers
1
star
69

hibernate-jpa-tutorial-code

Hibernate and JPA Tutorial Code
Java
1
star
70

Interesting-Java-Tutorials

Interesting-Java-Tutorials about different Topics
Java
1
star
71

Spring-Boot-WebService-Example

Spring-Boot-WebService-Example Full example
Java
1
star
72

DragAdjustableLabel

JavaFX custom Node which is working like an invisible Slider
Java
1
star
73

GitViewer

React Native Exercise github ( login , view repos etc)
JavaScript
1
star
74

Java-Media-Player-Tutorials

Audio+Video in Java
Java
1
star
75

NodeJSNotes

The Complete Node.js Developer Course (3rd Edition) - notes from course βœ¨πŸ’πŸš€βœ¨
1
star
76

React-Budget

React Budget Managing Website
1
star
77

StockTour

Calculate your stocks profits instantly ;)
JavaScript
1
star
78

JavaScript-OIDC-Program

A useful Javascript program to create access tokens and debug OpenIDConnect Servers
HTML
1
star
79

JSoup-Apache-Poi-Example

Parsing HTML with JSoup and putting data to excel with Apache-Poi
Java
1
star
80

react-advanced-components

βš›οΈ Advanced Ready to use React Components
JavaScript
1
star
81

media-player-JavaFX

A simple media player in JavaFX
Java
1
star
82

JavaFXBrowserOverlay

Example repository of how to use https://github.com/goxr3plus/JavaFX-Web-Browser
Java
1
star
83

Advanced-Ruby-on-Rails-Shop

Advanced Ruby on Rails Eshop
Ruby
1
star
84

IBM-Watson-Speech-Recognition-Tutorials

IBM Watson Speech Recognition Tutorials
1
star
85

Java-Linker-Tutorial

(JLink) Java Linker complete tutorial
1
star
86

react-native-guess-the-number-app

πŸ‘‹ βš›οΈ React Native guess number app using expo SDK 37 βš›οΈπŸ‘‹
JavaScript
1
star
87

XR3Dreamer

What if you describe your dream in words and you get a video from it :) ?
CSS
1
star
88

Eventour

Create social events and book your place in night clubs and more
JavaScript
1
star
89

SpringJDBC_Advanced_Tutorials

Detailed examples on spring jdbc template
Java
1
star
90

JFXCustomCursor

Create powerful JavaFX custom cursors
Java
1
star
91

javasysmon

A correct version of javasysmon without bugs for Windows 7
Java
1
star
92

expo-unused-assets

Check react native expo project for unused assets
JavaScript
1
star
93

Eclipse-WorkSpace-Settings

Eclipse-WorkSpace-Settings
JavaScript
1
star
94

XR3AI

Artificial Intelligence JavaFX Assistant ( made for XR3Player )
1
star
95

WebRTC-Psychologist

Futuristic site based on WebRTC that can find your emotions through sound and images .
JavaScript
1
star
96

XR3ChatServer

πŸ’¬The Server for the XR3Chat application
Java
1
star
97

React-Native-Zero-Fap-Addiction

βš›οΈPlaystore React Native Quit Bad Habit Application βš›οΈ
1
star