Menu

#23 Add ability to turn sound and music on/off and change volume

0.9.7
open
None
2016-09-24
2016-09-24
Nigel Gay
No

This isn't technically possible at the moment with the library that I'm using, but wanted to log it at least.

Discussion

  • Cor'e  =)

    Cor'e =) - 2016-09-24

    JLayer is really dated, but here are the last Contacts:

    Open Source Project
    Last Update : 11/28/2004

    The JLayer project has been launched on February 1999. The goal is to provide a Java™ - real time - MP3 decoder library. JLayerME sub-project has been launched on April 2002, it's the J2ME-oriented version of JLayer.

    Both JLayer and JLayerME are licensed under LGPL.

    MP3SPI is a Java plugin, based on JLayer, that adds MP3 support to the Java platform. jlGui is a graphical music player (WinAmp clone). It focuses on the sound capabilities of Java and it relies on MP3SPI for MP3 support.

    The JLayer project is volunteer-driven. We don't have any specific requirement for volunteers other than willingness to really contribute while following the projects goal. Anyone wanting to join the development effort should send an email to jlayer@javazoom.net where all development efforts are coordinated.

    Contact :

    Dev. leader : jlayer@javazoom.net
    [Involved in : decoder, converter, simple player, mpeg spi, jlayerme, advanced player]
    

    Contributors :

    Matthew McGowan : javalayer@revival.force9.co.uk
    Mat, 28 years old, comes from Norway. His hobbies are eating and sleeping :-).
    [Involved in : decoder, converter, simple player]
    
    Matthias Pfisterer : matthias.pfisterer@web.de
    Matthias, 30 years old, comes from Germany. He works as a software engineer. He launched the "Tritonus" project (http://www.tritonus.org) and he contributed to "Java Sound Examples".
    [Involved in : mpeg spi]
    
    Michael Scheerer : m_scheerer@web.de
    Michael, 32 years old, comes from Germany too. He's a programmer of a small german company. He's also interested in mathematics, physics, astrophysics, and others sciences stuff.
    [Involved in : decoder]
    
    Daniel Szabo : szd713@hotmail.com
    Daniel, 29 years old, comes from Hungria. He works as a software engineer. He makes a special study of game programming and algorithm optimization.
    [Involved in : decoder]
    
    Micah Spears : micah@usa.com
    Micah, 21 years old, comes from USA. He works in software development. His hobbies are drinking and jet skiing. He's also involved in Marquee XML-RPC open source project.
    [Involved in : jlayerme]
    
    Paul Santon : wanto_@hotmail.com
    Paul, 33 years old, comes from Sydney/Australia. He works as Software Engineer. To learn more about him check out his homepage.
    [Involved in : avanced player]
    
     
  • Cor'e  =)

    Cor'e =) - 2016-09-24

    If you're using the Java Sound API, you can set the volume with the MASTER_GAIN control.

    import javax.sound.sampled.*;

    AudioInputStream audioInputStream = AudioSystem.getAudioInputStream(
    new File("some_file.wav"));
    Clip clip = AudioSystem.getClip();
    clip.open(audioInputStream);
    FloatControl gainControl =
    (FloatControl) clip.getControl(FloatControl.Type.MASTER_GAIN);
    gainControl.setValue(-10.0f); // Reduce volume by 10 decibels.
    clip.start();

     

Log in to post a comment.

MongoDB Logo MongoDB