Package sidplay.audio

Klasse JavaSound

java.lang.Object
sidplay.audio.JavaSound
Alle implementierten Schnittstellen:
AudioDriver
Bekannte direkte Unterklassen:
CmpToMP3FileDriver

public class JavaSound extends Object implements AudioDriver
  • Felddetails

  • Konstruktordetails

    • JavaSound

      public JavaSound()
  • Methodendetails

    • open

      public void open(IAudioSection audioSection, String recordingFilename, CPUClock cpuClock, EventScheduler context) throws IOException, LineUnavailableException, InterruptedException
      Beschreibung aus Schnittstelle kopiert: AudioDriver
      Open audio interface.
      Angegeben von:
      open in Schnittstelle AudioDriver
      Parameter:
      audioSection - audio configuration
      recordingFilename - name for a recording
      cpuClock - CPU clock
      context - event context
      Löst aus:
      IOException
      LineUnavailableException
      InterruptedException
    • open

      public void open(AudioConfig cfg, Mixer.Info info) throws LineUnavailableException
      The audio parameters may be manipulated by open().
      Parameter:
      cfg - audio configuration
      info - mixer info
      Löst aus:
      LineUnavailableException
    • setAudioDevice

      public void setAudioDevice(Mixer.Info info) throws LineUnavailableException
      Löst aus:
      LineUnavailableException
    • write

      public void write() throws InterruptedException
      Beschreibung aus Schnittstelle kopiert: AudioDriver
      Write the complete contents of ByteBuffer to audio device.
      Angegeben von:
      write in Schnittstelle AudioDriver
      Löst aus:
      InterruptedException
    • getRemainingPlayTime

      public int getRemainingPlayTime()
      Estimate the length of audio data before we run out
      Gibt zurück:
      playback time in ms
    • pause

      public void pause()
      Beschreibung aus Schnittstelle kopiert: AudioDriver
      Temporarily cease audio production, for instance if user paused the application. Some backends such as DirectSound end up looping the audio unless explicitly told to pause. Audio will be resumed automatically on next write().
      Angegeben von:
      pause in Schnittstelle AudioDriver
    • flush

      public void flush()
    • close

      public void close()
      Beschreibung aus Schnittstelle kopiert: AudioDriver
      Free the audio device. (Counterpart of open().)
      Angegeben von:
      close in Schnittstelle AudioDriver
    • buffer

      public ByteBuffer buffer()
      Beschreibung aus Schnittstelle kopiert: AudioDriver
      Return the bytebuffer intended to hold the audio data. The audio data is in interleaved format and has as many channels as given by the result of open(). Use putShort() to write 16-bit values. Don't call write() until you have filled the entire buffer with audio.
      Angegeben von:
      buffer in Schnittstelle AudioDriver
      Gibt zurück:
      The buffer to write audio to.
    • isRecording

      public boolean isRecording()
      Angegeben von:
      isRecording in Schnittstelle AudioDriver
      Gibt zurück:
      is this audio driver recording tunes?
    • getDeviceInfo

      public static final Mixer.Info getDeviceInfo(IAudioSection audioSection)
    • getDeviceInfos

      public static final List<Mixer.Info> getDeviceInfos()