congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
Music$OnCompletionListener
Code IndexAdd Tabnine to your IDE (free)

How to use
Music$OnCompletionListener
in
com.badlogic.gdx.audio

Best Java code snippets using com.badlogic.gdx.audio.Music$OnCompletionListener (Showing top 20 results out of 315)

origin: libgdx/libgdx

  alSourceQueueBuffers(sourceID, bufferID);
if (!filled && onCompletionListener != null) onCompletionListener.onCompletion(this);
origin: org.mini2Dx/mini2Dx-desktop

if (!filled) {
  stop();
  if (onCompletionListener != null) onCompletionListener.onCompletion(this);
origin: com.badlogicgames.gdx/gdx-backend-lwjgl3

  alSourceQueueBuffers(sourceID, bufferID);
if (!filled && onCompletionListener != null) onCompletionListener.onCompletion(this);
origin: com.badlogicgames.gdx/gdx-backend-lwjgl

if (!filled) {
  stop();
  if (onCompletionListener != null) onCompletionListener.onCompletion(this);
origin: com.badlogicgames.gdx/gdx-backend-lwjgl3

if (!filled) {
  stop();
  if (onCompletionListener != null) onCompletionListener.onCompletion(this);
origin: com.badlogicgames.gdx/gdx-backend-lwjgl

  alSourceQueueBuffers(sourceID, bufferID);
if (!filled && onCompletionListener != null) onCompletionListener.onCompletion(this);
origin: org.mini2Dx/mini2Dx-desktop

  alSourceQueueBuffers(sourceID, bufferID);
if (!filled && onCompletionListener != null) onCompletionListener.onCompletion(this);
origin: org.mini2Dx/mini2Dx-desktop

public void update () {
  if (audio.noDevice) return;
  if (sourceID == -1) return;
  boolean end = false;
  int buffers = alGetSourcei(sourceID, AL_BUFFERS_PROCESSED);
  while (buffers-- > 0) {
    int bufferID = alSourceUnqueueBuffers(sourceID);
    if (bufferID == AL_INVALID_VALUE) break;
    renderedSeconds = renderedSecondsQueue.pop();
    if (end) continue;
    if (fill(bufferID))
      alSourceQueueBuffers(sourceID, bufferID);
    else
      end = true;
  }
  if (end && alGetSourcei(sourceID, AL_BUFFERS_QUEUED) == 0) {
    stop();
    if (onCompletionListener != null) onCompletionListener.onCompletion(this);
  }
  // A buffer underflow will cause the source to stop.
  if (isPlaying && alGetSourcei(sourceID, AL_SOURCE_STATE) != AL_PLAYING) alSourcePlay(sourceID);
}
origin: com.badlogicgames.gdx/gdx-backend-lwjgl

public void update () {
  if (audio.noDevice) return;
  if (sourceID == -1) return;
  boolean end = false;
  int buffers = alGetSourcei(sourceID, AL_BUFFERS_PROCESSED);
  while (buffers-- > 0) {
    int bufferID = alSourceUnqueueBuffers(sourceID);
    if (bufferID == AL_INVALID_VALUE) break;
    if (renderedSecondsQueue.size > 0) renderedSeconds = renderedSecondsQueue.pop();
    if (end) continue;
    if (fill(bufferID))
      alSourceQueueBuffers(sourceID, bufferID);
    else
      end = true;
  }
  if (end && alGetSourcei(sourceID, AL_BUFFERS_QUEUED) == 0) {
    stop();
    if (onCompletionListener != null) onCompletionListener.onCompletion(this);
  }
  // A buffer underflow will cause the source to stop.
  if (isPlaying && alGetSourcei(sourceID, AL_SOURCE_STATE) != AL_PLAYING) alSourcePlay(sourceID);
}
origin: com.badlogicgames.gdx/gdx-backend-lwjgl3

public void update () {
  if (audio.noDevice) return;
  if (sourceID == -1) return;
  boolean end = false;
  int buffers = alGetSourcei(sourceID, AL_BUFFERS_PROCESSED);
  while (buffers-- > 0) {
    int bufferID = alSourceUnqueueBuffers(sourceID);
    if (bufferID == AL_INVALID_VALUE) break;
    if (renderedSecondsQueue.size > 0) renderedSeconds = renderedSecondsQueue.pop();
    if (end) continue;
    if (fill(bufferID))
      alSourceQueueBuffers(sourceID, bufferID);
    else
      end = true;
  }
  if (end && alGetSourcei(sourceID, AL_BUFFERS_QUEUED) == 0) {
    stop();
    if (onCompletionListener != null) onCompletionListener.onCompletion(this);
  }
  // A buffer underflow will cause the source to stop.
  if (isPlaying && alGetSourcei(sourceID, AL_SOURCE_STATE) != AL_PLAYING) alSourcePlay(sourceID);
}
origin: konsoletyper/teavm-libgdx

public TeaVMMusic(TeaVMFileHandle file) {
  element = (HTMLAudioElement)window.getDocument().createElement("audio");
  element.setSrc("assets/" + file.path());
  element.addEventListener("ended", (EventListener) evt -> {
    if (listener != null) {
      listener.onCompletion(TeaVMMusic.this);
    }
  });
  window.getDocument().getBody().appendChild(element);
}
origin: com.badlogicgames.gdx/gdx-backend-gwt

  @Override
  public void onfinish () {
    if (isLooping)
      play();
    else if (onCompletionListener != null)
      onCompletionListener.onCompletion(this);
  }
}
origin: libgdx/libgdx

  alSourceQueueBuffers(sourceID, bufferID);
if (!filled && onCompletionListener != null) onCompletionListener.onCompletion(this);
origin: libgdx/libgdx

if (!filled) {
  stop();
  if (onCompletionListener != null) onCompletionListener.onCompletion(this);
origin: libgdx/libgdx

if (!filled) {
  stop();
  if (onCompletionListener != null) onCompletionListener.onCompletion(this);
origin: libgdx/libgdx

  alSourceQueueBuffers(sourceID, bufferID);
if (!filled && onCompletionListener != null) onCompletionListener.onCompletion(this);
origin: libgdx/libgdx

if (!filled) {
  stop();
  if (onCompletionListener != null) onCompletionListener.onCompletion(this);
origin: libgdx/libgdx

if (!filled) {
  stop();
  if (onCompletionListener != null) onCompletionListener.onCompletion(this);
origin: libgdx/libgdx

  alSourceQueueBuffers(sourceID, bufferID);
if (!filled && onCompletionListener != null) onCompletionListener.onCompletion(this);
origin: libgdx/libgdx

public void update () {
  if (audio.noDevice) return;
  if (sourceID == -1) return;
  boolean end = false;
  int buffers = alGetSourcei(sourceID, AL_BUFFERS_PROCESSED);
  while (buffers-- > 0) {
    int bufferID = alSourceUnqueueBuffers(sourceID);
    if (bufferID == AL_INVALID_VALUE) break;
    if (renderedSecondsQueue.size > 0) renderedSeconds = renderedSecondsQueue.pop();
    if (end) continue;
    if (fill(bufferID))
      alSourceQueueBuffers(sourceID, bufferID);
    else
      end = true;
  }
  if (end && alGetSourcei(sourceID, AL_BUFFERS_QUEUED) == 0) {
    stop();
    if (onCompletionListener != null) onCompletionListener.onCompletion(this);
  }
  // A buffer underflow will cause the source to stop.
  if (isPlaying && alGetSourcei(sourceID, AL_SOURCE_STATE) != AL_PLAYING) alSourcePlay(sourceID);
}
com.badlogic.gdx.audioMusic$OnCompletionListener

Javadoc

Interface definition for a callback to be invoked when playback of a music stream has completed.

Most used methods

  • onCompletion
    Called when the end of a media source is reached during playback.

Popular in Java

  • Reactive rest calls using spring rest template
  • startActivity (Activity)
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • notifyDataSetChanged (ArrayAdapter)
  • GridLayout (java.awt)
    The GridLayout class is a layout manager that lays out a container's components in a rectangular gri
  • IOException (java.io)
    Signals a general, I/O-related error. Error details may be specified when calling the constructor, a
  • HashSet (java.util)
    HashSet is an implementation of a Set. All optional operations (adding and removing) are supported.
  • CountDownLatch (java.util.concurrent)
    A synchronization aid that allows one or more threads to wait until a set of operations being perfor
  • Modifier (javassist)
    The Modifier class provides static methods and constants to decode class and member access modifiers
  • LogFactory (org.apache.commons.logging)
    Factory for creating Log instances, with discovery and configuration features similar to that employ
  • Top PhpStorm plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now