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
-
Methodenübersicht
Modifizierer und TypMethodeBeschreibungbuffer()Return the bytebuffer intended to hold the audio data.voidclose()Free the audio device.default Stringbooleandefault <T extends AudioDriver>
Optional<T> voidopen(IAudioSection audioSection, String recordingFilename, CPUClock cpuClock, EventScheduler context) Open audio interface.default voidpause()Temporarily cease audio production, for instance if user paused the application.voidwrite()Write the complete contents of ByteBuffer to audio device.
-
Methodendetails
-
open
void open(IAudioSection audioSection, String recordingFilename, CPUClock cpuClock, EventScheduler context) throws IOException, LineUnavailableException, InterruptedException Open audio interface.- Parameter:
audioSection- audio configurationrecordingFilename- name for a recordingcpuClock- CPU clockcontext- event context- Löst aus:
IOExceptionLineUnavailableExceptionInterruptedException
-
write
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
- Gibt zurück:
- file extension for recordings
-
lookup
- Gibt zurück:
- concrete audio driver, if proxied
-