Java Code Examples for com.jme3.system.JmeSystem#newAudioRenderer()

The following examples show how to use com.jme3.system.JmeSystem#newAudioRenderer() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: TestMusicPlayer.java    From jmonkeyengine with BSD 3-Clause "New" or "Revised" License 5 votes vote down vote up
private void initAudioPlayer(){
    AppSettings settings = new AppSettings(true);
    settings.setRenderer(null); // disable rendering
    settings.setAudioRenderer("LWJGL");
    ar = JmeSystem.newAudioRenderer(settings);
    ar.initialize();
    ar.setListener(listener);
    AudioContext.setAudioRenderer(ar);
}
 
Example 2
Source File: VRApplication.java    From jmonkeyengine with BSD 3-Clause "New" or "Revised" License 5 votes vote down vote up
private void initAudio(){
    if (settings.getAudioRenderer() != null && context.getType() != JmeContext.Type.Headless){
        audioRenderer = JmeSystem.newAudioRenderer(settings);
        audioRenderer.initialize();
        AudioContext.setAudioRenderer(audioRenderer);

        listener = new Listener();
        audioRenderer.setListener(listener);
    }
}
 
Example 3
Source File: TestMusicPlayer.java    From MikuMikuStudio with BSD 2-Clause "Simplified" License 5 votes vote down vote up
private void initAudioPlayer(){
    AppSettings settings = new AppSettings(true);
    settings.setRenderer(null); // disable rendering
    settings.setAudioRenderer("LWJGL");
    ar = JmeSystem.newAudioRenderer(settings);
    ar.initialize();
    ar.setListener(listener);
}
 
Example 4
Source File: Application.java    From MikuMikuStudio with BSD 2-Clause "Simplified" License 5 votes vote down vote up
private void initAudio(){
    if (settings.getAudioRenderer() != null && context.getType() != Type.Headless){
        audioRenderer = JmeSystem.newAudioRenderer(settings);
        audioRenderer.initialize();
        AudioContext.setAudioRenderer(audioRenderer);

        listener = new Listener();
        audioRenderer.setListener(listener);
    }
}