Package sidplay.audio
Klasse JavaSound
java.lang.Object
sidplay.audio.JavaSound
- Alle implementierten Schnittstellen:
AudioDriver
- Bekannte direkte Unterklassen:
CmpToMP3FileDriver
-
Feldübersicht
FelderModifizierer und TypFeldBeschreibungprivate AudioFormatprivate AudioConfigprivate SourceDataLineprivate ByteBuffer -
Konstruktorübersicht
Konstruktoren -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungbuffer()Return the bytebuffer intended to hold the audio data.voidclose()Free the audio device.voidflush()static final Mixer.InfogetDeviceInfo(IAudioSection audioSection) static final List<Mixer.Info> intEstimate the length of audio data before we run outbooleanvoidopen(IAudioSection audioSection, String recordingFilename, CPUClock cpuClock, EventScheduler context) Open audio interface.voidopen(AudioConfig cfg, Mixer.Info info) The audio parameters may be manipulated by open().voidpause()Temporarily cease audio production, for instance if user paused the application.voidsetAudioDevice(Mixer.Info info) voidwrite()Write the complete contents of ByteBuffer to audio device.Von Klasse geerbte Methoden java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitVon Schnittstelle geerbte Methoden sidplay.audio.AudioDriver
getExtension, lookup
-
Felddetails
-
cfg
-
audioFormat
-
dataLine
-
sampleBuffer
-
-
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:AudioDriverOpen audio interface.- Angegeben von:
openin SchnittstelleAudioDriver- Parameter:
audioSection- audio configurationrecordingFilename- name for a recordingcpuClock- CPU clockcontext- event context- Löst aus:
IOExceptionLineUnavailableExceptionInterruptedException
-
open
The audio parameters may be manipulated by open().- Parameter:
cfg- audio configurationinfo- mixer info- Löst aus:
LineUnavailableException
-
setAudioDevice
- Löst aus:
LineUnavailableException
-
write
Beschreibung aus Schnittstelle kopiert:AudioDriverWrite the complete contents of ByteBuffer to audio device.- Angegeben von:
writein SchnittstelleAudioDriver- 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:AudioDriverTemporarily 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:
pausein SchnittstelleAudioDriver
-
flush
public void flush() -
close
public void close()Beschreibung aus Schnittstelle kopiert:AudioDriverFree the audio device. (Counterpart of open().)- Angegeben von:
closein SchnittstelleAudioDriver
-
buffer
Beschreibung aus Schnittstelle kopiert:AudioDriverReturn 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:
bufferin SchnittstelleAudioDriver- Gibt zurück:
- The buffer to write audio to.
-
isRecording
public boolean isRecording()- Angegeben von:
isRecordingin SchnittstelleAudioDriver- Gibt zurück:
- is this audio driver recording tunes?
-
getDeviceInfo
-
getDeviceInfos
-