Package sidplay.audio

Schnittstelle AudioDriver

Alle bekannten Implementierungsklassen:
AACDriver, AACDriver.AACFileDriver, AACDriver.AACStreamDriver, AudioDriverTeaVM, AVIDriver, AVIDriver.AVIFileDriver, CmpToMP3FileDriver, FLACDriver, FLACDriver.FLACFileDriver, FLACDriver.FLACStreamDriver, FLVDriver, FLVDriver.FLVFileDriver, FLVDriver.FLVStreamDriver, JavaSound, JMP3Driver, JMP3Driver.JMP3FileDriver, JMP3Driver.JMP3StreamDriver, JWAVDriver, JWAVDriver.JWAVFileDriver, JWAVDriver.JWAVStreamDriver, MP3Driver, MP3Driver.MP3FileDriver, MP3Driver.MP3StreamDriver, MP4Driver, MP4Driver.MP4FileDriver, ProxyDriver, SIDDumpDriver, SIDDumpDriver.SIDDumpFileDriver, SIDDumpDriver.SIDDumpStreamDriver, SIDRegDriver, SIDRegDriver.SIDRegFileDriver, SIDRegDriver.SIDRegStreamDriver, ThrottlingDriver, WAVDriver, WAVDriver.WAVFileDriver, WAVDriver.WAVStreamDriver, WhatsSidDriver, XuggleAudioDriver, XuggleVideoDriver

public interface AudioDriver
  • Methodendetails

    • open

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

      void write() throws InterruptedException
      Write the complete contents of ByteBuffer to audio device.
      Löst aus:
      InterruptedException
    • pause

      default void pause()
      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().
    • close

      void close()
      Free the audio device. (Counterpart of open().)
    • buffer

      ByteBuffer buffer()
      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.
      Gibt zurück:
      The buffer to write audio to.
    • isRecording

      boolean isRecording()
      Gibt zurück:
      is this audio driver recording tunes?
    • getExtension

      default String getExtension()
      Gibt zurück:
      file extension for recordings
    • lookup

      default <T extends AudioDriver> Optional<T> lookup(Class<T> clz)
      Gibt zurück:
      concrete audio driver, if proxied