Search in sources :

Example 1 with OALAudioTrack

use of com.badlogic.gdx.backends.iosrobovm.objectal.OALAudioTrack in project libgdx by libgdx.

the class IOSAudio method newMusic.

@Override
public Music newMusic(FileHandle fileHandle) {
    String path = fileHandle.file().getPath().replace('\\', '/');
    OALAudioTrack track = OALAudioTrack.create();
    if (track != null) {
        if (track.preloadFile(path)) {
            return new IOSMusic(track);
        }
    }
    throw new GdxRuntimeException("Error opening music file at " + path);
}
Also used : GdxRuntimeException(com.badlogic.gdx.utils.GdxRuntimeException) OALAudioTrack(com.badlogic.gdx.backends.iosrobovm.objectal.OALAudioTrack)

Aggregations

OALAudioTrack (com.badlogic.gdx.backends.iosrobovm.objectal.OALAudioTrack)1 GdxRuntimeException (com.badlogic.gdx.utils.GdxRuntimeException)1