|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object javax.sound.sampled.AudioFormat com.groovemanager.spi.asio.ASIOAudioFormat
final class ASIOAudioFormat
This class maps the ASIOSampleType values to a JavaSound AudioFormat
Nested Class Summary | |
---|---|
(package private) static class |
ASIOAudioFormat.Encoding
|
Field Summary |
---|
Fields inherited from class javax.sound.sampled.AudioFormat |
---|
bigEndian, channels, encoding, frameRate, frameSize, sampleRate, sampleSizeInBits |
Constructor Summary | |
---|---|
ASIOAudioFormat(ASIOAudioFormat.Encoding encoding,
float sampleRate,
int sampleSizeInBits,
int channels,
int frameSize,
float frameRate,
boolean bigEndian)
Constructs an ASIOAudioFormat with the given parameters. |
|
ASIOAudioFormat(float sampleRate,
int type,
int channels)
Constructs a new ASIOAudioFormat of the specified ASIOSampleType, with the given sampleRate and channels |
Method Summary | |
---|---|
static ASIOAudioFormat |
convertToASIOAudioFormat(AudioFormat format)
|
static ASIOAudioFormat[] |
convertToASIOAudioFormat(AudioFormat[] format)
|
private static AudioFormat.Encoding |
getEncoding(int type)
Get the Encoding out of the given ASIOSampleType |
private static boolean |
getEndianess(int type)
Get the endianess out of the given ASIOSampleType |
private static int |
getFrameSize(int type,
int channels)
Get the frame size out of the given ASIOSampleType |
private static int |
getSampleSizeInBits(int type)
Get the sample size out of the given ASIOSampleType |
boolean |
matches(AudioFormat format)
Indicates whether this format matches the one specified. |
Methods inherited from class javax.sound.sampled.AudioFormat |
---|
getChannels, getEncoding, getFrameRate, getFrameSize, getProperty, getSampleRate, getSampleSizeInBits, isBigEndian, properties, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
ASIOAudioFormat(float sampleRate, int type, int channels)
sampleRate
- The sampleRate of the formattype
- The ASIOSampleType constantchannels
- The number of channelspublic ASIOAudioFormat(ASIOAudioFormat.Encoding encoding, float sampleRate, int sampleSizeInBits, int channels, int frameSize, float frameRate, boolean bigEndian)
ASIOAudioFormat
with the given parameters.
The encoding specifies the convention used to represent the data.
The other parameters are further explained in the class description
.
encoding
- the audio encoding techniquesampleRate
- the number of samples per secondsampleSizeInBits
- the number of bits in each samplechannels
- the number of channels (1 for mono, 2 for stereo, and so on)frameSize
- the number of bytes in each frameframeRate
- the number of frames per secondbigEndian
- indicates whether the data for a single sample
is stored in big-endian byte order (false
means little-endian)Method Detail |
---|
private static AudioFormat.Encoding getEncoding(int type)
type
- The ASIOSampleType constant
private static int getSampleSizeInBits(int type)
type
- The ASIOSampleType constant
private static int getFrameSize(int type, int channels)
type
- The ASIOSampleType constantchannels
- The number of channels
private static boolean getEndianess(int type)
type
- The ASIOSampleType constant
public boolean matches(AudioFormat format)
AudioSystem.NOT_SPECIFIED
,
which any sample rate will match. The frame rates must
similarly be equal, unless the specified format has the frame rate
value AudioSystem.NOT_SPECIFIED
. The byte order (big-endian or little-endian)
must match if the sample size is greater than one byte.
matches
in class AudioFormat
format
- format to test for match
true
if this format matches the one specified,
false
otherwise.public static ASIOAudioFormat convertToASIOAudioFormat(AudioFormat format)
public static ASIOAudioFormat[] convertToASIOAudioFormat(AudioFormat[] format)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |