congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
AudioDevice.dispose
Code IndexAdd Tabnine to your IDE (free)

How to use
dispose
method
in
com.badlogic.gdx.audio.AudioDevice

Best Java code snippets using com.badlogic.gdx.audio.AudioDevice.dispose (Showing top 3 results out of 315)

origin: libgdx/libgdx

@Override
public void pause () {
  device.dispose();
  recorder.dispose();
}
origin: libgdx/libgdx

  @Override
  public void run () {
    final float frequency = 440;
    float increment = (float)(2 * Math.PI) * frequency / 44100; // angular increment for each sample
    float angle = 0;
    float samples[] = new float[1024];
    while (!stop) {
      for (int i = 0; i < samples.length; i += 2) {
        samples[i] = 0.5f * (float)Math.sin(angle);
        samples[i + 1] = 2 * samples[i];
        angle += increment;
      }
      device.writeSamples(samples, 0, samples.length);
    }
    device.dispose();
  }
});
origin: tube42/drumon

  public void close()
  {
    if(ad != null) {
      System.out.println("DEVICE OUTPUT: closing...");
      ad.dispose();
      ad = null;
    }
  }
}
com.badlogic.gdx.audioAudioDevicedispose

Javadoc

Frees all resources associated with this AudioDevice. Needs to be called when the device is no longer needed.

Popular methods of AudioDevice

  • writeSamples
    Writes the array of 16-bit signed PCM samples to the audio device and blocks until they have been pr
  • getLatency
  • isMono

Popular in Java

  • Parsing JSON documents to java classes using gson
  • getApplicationContext (Context)
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • getExternalFilesDir (Context)
  • Thread (java.lang)
    A thread is a thread of execution in a program. The Java Virtual Machine allows an application to ha
  • BitSet (java.util)
    The BitSet class implements abit array [http://en.wikipedia.org/wiki/Bit_array]. Each element is eit
  • CountDownLatch (java.util.concurrent)
    A synchronization aid that allows one or more threads to wait until a set of operations being perfor
  • HttpServletRequest (javax.servlet.http)
    Extends the javax.servlet.ServletRequest interface to provide request information for HTTP servlets.
  • JTextField (javax.swing)
  • Get (org.apache.hadoop.hbase.client)
    Used to perform Get operations on a single row. To get everything for a row, instantiate a Get objec
  • Top Sublime Text 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