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

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

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

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: 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

  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);
}
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);
}
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);
}
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);
}
origin: libgdx/libgdx

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

  @Override
  public void run () {
    onCompletionListener.onCompletion(AndroidMusic.this);
  }
});
origin: libgdx/libgdx

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

  @Override
  public void run () {
    onCompletionListener.onCompletion(AndroidMusic.this);
  }
});
com.badlogic.gdx.audioMusic$OnCompletionListeneronCompletion

Javadoc

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

Popular methods of Music$OnCompletionListener

    Popular in Java

    • Parsing JSON documents to java classes using gson
    • compareTo (BigDecimal)
    • getSupportFragmentManager (FragmentActivity)
    • setContentView (Activity)
    • FileReader (java.io)
      A specialized Reader that reads from a file in the file system. All read requests made by calling me
    • Locale (java.util)
      Locale represents a language/country/variant combination. Locales are used to alter the presentatio
    • Properties (java.util)
      A Properties object is a Hashtable where the keys and values must be Strings. Each property can have
    • StringUtils (org.apache.commons.lang)
      Operations on java.lang.String that arenull safe. * IsEmpty/IsBlank - checks if a String contains
    • IsNull (org.hamcrest.core)
      Is the value null?
    • Runner (org.openjdk.jmh.runner)
    • Best IntelliJ 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