public class SoundOutputStreamImpl extends Object implements SoundOutputStream
| Modifier and Type | Field and Description |
|---|---|
protected AudioFormat |
audioFormat |
protected AudioProcessor |
audioProcessor |
protected float |
currentBalance |
protected float |
currentVolume |
protected File |
exportFile |
protected boolean |
keepSilent |
protected boolean |
playDuringExport |
protected SourceDataLine |
sourceLine |
protected WaveFile |
waveExportFile |
| Modifier | Constructor and Description |
|---|---|
protected |
SoundOutputStreamImpl() |
|
SoundOutputStreamImpl(AudioFormat audioFormat,
AudioProcessor audioProcessor,
File exportFile,
boolean playDuringExport,
boolean keepSilent)
Constructor for SoundOutputStreamImpl
|
| Modifier and Type | Method and Description |
|---|---|
void |
changeAudioFormatTo(AudioFormat newAudioFormat) |
void |
close() |
void |
closeAllDevices() |
protected void |
closeAudioProcessor() |
protected void |
closeExportFile() |
protected void |
closeSourceLine() |
AudioFormat |
getAudioFormat() |
long |
getFramePosition() |
boolean |
isInitialized() |
boolean |
matches(SoundOutputStream otherStream) |
void |
open() |
protected void |
openAudioProcessor() |
protected void |
openExportFile() |
protected void |
openSourceLine() |
void |
setAudioProcessor(AudioProcessor audioProcessor) |
void |
setBalance(float balance)
Set the Balance of the sourceLine
|
void |
setExportFile(File exportFile) |
void |
setInternalFramePosition(long newFramePosition) |
void |
setKeepSilent(boolean keepSilent) |
void |
setPlayDuringExport(boolean playDuringExport) |
void |
setVolume(float gain)
Set the Gain of the sourceLine
|
void |
setWaveExportFile(WaveFile waveExportFile) |
void |
startLine() |
void |
stopLine() |
void |
writeSampleData(byte[] samples,
int start,
int length) |
protected void |
writeSampleDataInternally(byte[] samples,
int start,
int length) |
protected AudioProcessor audioProcessor
protected AudioFormat audioFormat
protected File exportFile
protected float currentVolume
protected float currentBalance
protected SourceDataLine sourceLine
protected WaveFile waveExportFile
protected boolean playDuringExport
protected boolean keepSilent
protected SoundOutputStreamImpl()
public SoundOutputStreamImpl(AudioFormat audioFormat, AudioProcessor audioProcessor, File exportFile, boolean playDuringExport, boolean keepSilent)
audioFormat - the Format of delivered AudioaudioProcessor - the class of the audioProcessor - if anyexportFile - exportFile - the File to write toplayDuringExport - if true, data will be send to line and filekeepSilent - if true, 0 bytes will be send to the lineprotected void openSourceLine()
protected void openAudioProcessor()
protected void openExportFile()
protected void closeSourceLine()
protected void closeAudioProcessor()
protected void closeExportFile()
public void open()
open in interface SoundOutputStreampublic void close()
close in interface SoundOutputStreampublic void closeAllDevices()
closeAllDevices in interface SoundOutputStreampublic boolean isInitialized()
isInitialized in interface SoundOutputStreampublic void startLine()
startLine in interface SoundOutputStreampublic void stopLine()
stopLine in interface SoundOutputStreamprotected void writeSampleDataInternally(byte[] samples,
int start,
int length)
samples - start - length - public void writeSampleData(byte[] samples,
int start,
int length)
writeSampleData in interface SoundOutputStreamsamples - start - length - public void setInternalFramePosition(long newFramePosition)
setInternalFramePosition in interface SoundOutputStreamnewFramePosition - SoundOutputStream.setInternalFramePosition(long)public long getFramePosition()
getFramePosition in interface SoundOutputStreamSoundOutputStream.getFramePosition()public void setVolume(float gain)
setVolume in interface SoundOutputStreamgain - public void setBalance(float balance)
setBalance in interface SoundOutputStreamgain - public void setAudioProcessor(AudioProcessor audioProcessor)
setAudioProcessor in interface SoundOutputStreamaudioProcessor - the audioProcessor to setpublic void setExportFile(File exportFile)
setExportFile in interface SoundOutputStreamexportFile - the exportFile to setpublic void setWaveExportFile(WaveFile waveExportFile)
setWaveExportFile in interface SoundOutputStreamwaveExportFile - the waveExportFile to setpublic void setPlayDuringExport(boolean playDuringExport)
setPlayDuringExport in interface SoundOutputStreamplayDuringExport - the playDuringExport to setpublic void setKeepSilent(boolean keepSilent)
setKeepSilent in interface SoundOutputStreamkeepSilent - the keepSilent to setpublic boolean matches(SoundOutputStream otherStream)
matches in interface SoundOutputStreampublic AudioFormat getAudioFormat()
getAudioFormat in interface SoundOutputStreamSoundOutputStream.getAudioFormat()public void changeAudioFormatTo(AudioFormat newAudioFormat)
changeAudioFormatTo in interface SoundOutputStreamSoundOutputStream.changeAudioFormatTo(javax.sound.sampled.AudioFormat)Copyright © 2014. All rights reserved.