SoundSampleData

Inheritance: java.lang.Object

public class SoundSampleData

Represents additional entries specific to a sound object (Section 9.2 PDF1-7)

Constructors

ConstructorDescription
SoundSampleData(long samplingRate)Initializes new sound sample data.
SoundSampleData(long samplingRate, int numberOfSoundChannels)Initializes new sound sample data.
SoundSampleData(long samplingRate, int numberOfSoundChannels, int bitsPerChannel)Initializes new sound sample data.
SoundSampleData(long samplingRate, int numberOfSoundChannels, int bitsPerChannel, int soundSampleDataEncodingFormat)Initializes new sound sample data.

Fields

FieldDescription
DEFAULT_SAMPLING_RATEDefault value for SamplingRate.
DEFAULT_OF_SOUND_CHANNELSDefault value for Channels parameter.
DEFAULT_OF_BITS_PER_CHANNELDefault value for BitsPerchannel parameter.
DEFAULT_ENCODING_FORMATDefault value for encoding format.

Methods

MethodDescription
getSamplingRate()Gets the sampling rate.
setSamplingRate(long value)Sets the sampling rate.
getNumberOfSoundChannels()Gets the number of sound channels.
setNumberOfSoundChannels(int value)Sets the number of sound channels.
getBitsPerChannel()Gets the number of bits per sample value per channel.
setBitsPerChannel(int value)Sets the number of bits per sample value per channel.
getEncodingFormat_Rename_Namesake()Gets the encoding format.
setEncodingFormat(int value)Sets the encoding format.

SoundSampleData(long samplingRate)

public SoundSampleData(long samplingRate)

Initializes new sound sample data.

Parameters:

ParameterTypeDescription
samplingRatelongThe sampling rate.

SoundSampleData(long samplingRate, int numberOfSoundChannels)

public SoundSampleData(long samplingRate, int numberOfSoundChannels)

Initializes new sound sample data.

Parameters:

ParameterTypeDescription
samplingRatelongThe sampling rate.
numberOfSoundChannelsintThe number of sound channels.

SoundSampleData(long samplingRate, int numberOfSoundChannels, int bitsPerChannel)

public SoundSampleData(long samplingRate, int numberOfSoundChannels, int bitsPerChannel)

Initializes new sound sample data.

Parameters:

ParameterTypeDescription
samplingRatelongThe sampling rate.
numberOfSoundChannelsintThe number of sound channels.
bitsPerChannelintThe number of bits per sample value per channel.

SoundSampleData(long samplingRate, int numberOfSoundChannels, int bitsPerChannel, int soundSampleDataEncodingFormat)

public SoundSampleData(long samplingRate, int numberOfSoundChannels, int bitsPerChannel, int soundSampleDataEncodingFormat)

Initializes new sound sample data.

Parameters:

ParameterTypeDescription
samplingRatelongThe sampling rate.
numberOfSoundChannelsintThe number of sound channels.
bitsPerChannelintThe number of bits per sample value per channel.
soundSampleDataEncodingFormatintThe encoding format for the sample data.

DEFAULT_SAMPLING_RATE

public static final long DEFAULT_SAMPLING_RATE

Default value for SamplingRate.

DEFAULT_OF_SOUND_CHANNELS

public static final int DEFAULT_OF_SOUND_CHANNELS

Default value for Channels parameter.

DEFAULT_OF_BITS_PER_CHANNEL

public static final int DEFAULT_OF_BITS_PER_CHANNEL

Default value for BitsPerchannel parameter.

DEFAULT_ENCODING_FORMAT

public static final int DEFAULT_ENCODING_FORMAT

Default value for encoding format.

getSamplingRate()

public long getSamplingRate()

Gets the sampling rate.

Returns: long - long value

setSamplingRate(long value)

public void setSamplingRate(long value)

Sets the sampling rate.

Parameters:

ParameterTypeDescription
valuelonglong value

getNumberOfSoundChannels()

public int getNumberOfSoundChannels()

Gets the number of sound channels.

Returns: int - int value

setNumberOfSoundChannels(int value)

public void setNumberOfSoundChannels(int value)

Sets the number of sound channels.

Parameters:

ParameterTypeDescription
valueintint value

getBitsPerChannel()

public int getBitsPerChannel()

Gets the number of bits per sample value per channel.

Returns: int - int value

setBitsPerChannel(int value)

public void setBitsPerChannel(int value)

Sets the number of bits per sample value per channel.

Parameters:

ParameterTypeDescription
valueintint value

getEncodingFormat_Rename_Namesake()

public int getEncodingFormat_Rename_Namesake()

Gets the encoding format.

Returns: int - SoundSampleDataEncodingFormat value

setEncodingFormat(int value)

public void setEncodingFormat(int value)

Sets the encoding format.

Parameters:

ParameterTypeDescription
valueintSoundSampleDataEncodingFormat value