Skip to content

SimpleAudio is a pure Java library which allows you to play WAV, AIFF, AU, OGG and MP3 audio files in a unified way.

License

Notifications You must be signed in to change notification settings

RalleYTN/SimpleAudio

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build Result Coverage Status Codacy Badge

Description

SimpleAudio is a pure Java library which allows you to play WAV, AIFF, AU, OGG and MP3 audio files in a unified way. Audio output can be played streamed or buffered. It is also possible to record audio from input devices with it. The library was designed to be easy to use. Code written with it, is highly readable and maintainable.

Changelog

Version 2.0.1 (incompatible with older versions of this library)

  • Added the method setTrack to Playlist
  • Fixed an IndexOutOfBoundsException in the next and previous methods of the Playlist class
  • Made the project Maven compatible
  • Renamed Utils to Util
  • Added Unit-Tests
  • Updated the documentation
  • Moved everything static in the Audio interface to AbstractAudio
  • Fixed a bug that caused BufferedAudio.isPlaying() to return a wrong value
  • Fixed a bug that would re-open an instance of StreamedAudio if it was closed in the REACHED_END event
  • Added a close method in the Playlist class
  • Fixed most threading issues in StreamedAudio
  • Disabled dead code

Version 2.0.0 (incompatible with older versions of this library)

  • Made the project modular for Java 9 (should still be compatible with Java 8 and below though; not tested)
  • Added some more documentation
  • Created the package de.ralleytb.simple.audio.internal and moved the Utils and VorbisInputStream classes in it

Version 1.2.2

  • Added the method Recorder.start(File).
  • Added the method Audio.getDefaultAudioFormat().
  • The Recorder class now uses the AU file format because it doesn't need a pre-defined length.
  • Replaced the ogg-vorbis.jar with j-ogg.jar.

Version 1.2.1

  • Found a more elegant solution for reading the OGG headers.

Version 1.2.0

  • Added the ability to read headers of OGG files.
  • Added three new audio event types.
  • Audio events now also have attributes for old and new value.
  • Added the method Playable.isPaused(). (could cause incompatibility with older versions)
  • Added a PlaylistListener.

Version 1.1.0

  • Removed the RecordingListener interface. (causes incompatibility with older versions)
  • Removed the dispose method from Recorder. (causes incompatibility with older versions)
  • Added a new start method to Recorder which takes in an OutputStream on which the recorded data will be written.
  • Added the method Audio.getAudioInputStream(URL).
  • Added some system specific file formats.
  • Added the class Playlist.
  • Added the interface Playable and moved some methods from Audio to there.
  • Fixed some odd behavior with the StreamedAudio.resume() method.
  • Fixed weird control behavior.
  • The constructors of StreamedAudio and BufferedAudio now all throw an AudioException. (causes incompatibility with older versions)
  • Added the method Audio.getHeaders(). This works for all supported formats except FileFormat.OGG.
  • Added the method Audio.isOpen().
  • Added the AudioListener class.
  • Removed the Audio.ends() method. You should use an AudioListener instead. (causes incompatibility with older versions)

Version 1.0.0

  • Release

License

MIT License

Copyright (c) 2017 Ralph Niemitz

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.

Links

Dependencies