| Modifier and Type | Field and Description |
|---|---|
static int |
FLAG_ALL_DST
For internal use.
|
static int |
FLAG_ALL_DST_AND_SRC
For internal use.
|
static int |
FLAG_ALL_SRC
For internal use.
|
| Modifier and Type | Method and Description |
|---|---|
void |
append(NSoundBuffer soundBuffer)
Appends sound buffer to this instance.
|
void |
append(NSoundFormat soundFormat,
int sampleRate,
int sampleCount,
ByteBuffer samples)
Appends sound buffer to this instance.
|
void |
append(NSoundFormat soundFormat,
int sampleRate,
int sampleCount,
ByteBuffer samples,
int flags)
Appends sound buffer to this instance.
|
void |
append(NSoundFormat soundFormat,
int sampleRate,
Object minValue,
Object maxValue,
int sampleCount,
ByteBuffer samples,
int flags)
Appends sound buffer to this instance.
|
void |
clear()
Clears sound buffer.
|
static void |
copy(NSoundBuffer srcSoundBuffer,
int sampleIndex,
NSoundBuffer dstSoundBuffer,
int dstSampleIndex,
int sampleCount)
Copies specified rectangular area of the NSoundBuffer to other NSoundBuffer object.
|
static void |
copy(NSoundFormat srcSoundFormat,
int srcSampleRate,
int srcSampleCount,
ByteBuffer srcSamples,
int srcSampleIndex,
NSoundFormat dstSoundFormat,
int dstSampleRate,
int dstSampleCount,
ByteBuffer dstSamples,
int dstSampleIndex,
int sampleCount)
Copies specified rectangular area of the NSoundBuffer to other NSoundBuffer object.
|
static void |
copy(NSoundFormat srcSoundFormat,
int srcSampleRate,
int srcSampleCount,
ByteBuffer srcSamples,
int srcSampleIndex,
NSoundFormat dstSoundFormat,
int dstSampleRate,
int dstSampleCount,
ByteBuffer dstSamples,
int dstSampleIndex,
int sampleCount,
int flags)
Copies sound buffer data to another sound buffer data.
|
static void |
copy(NSoundFormat srcSoundFormat,
int srcSampleRate,
Object srcMinValue,
Object srcMaxValue,
int srcSampleCount,
ByteBuffer srcSamples,
int srcSampleIndex,
NSoundFormat dstSoundFormat,
int dstSampleRate,
Object dstMinValue,
Object dstMaxValue,
int dstSampleCount,
ByteBuffer dstSamples,
int dstSampleIndex,
int sampleCount,
int flags)
Copies specified rectangular area of the NSoundBuffer to other NSoundBuffer object.
|
void |
copyFrom(NSoundFormat srcSoundFormat,
int srcSampleRate,
int srcSampleCount,
ByteBuffer srcSamples,
int sampleIndex)
Copies data from the specified sound buffer to the current sound buffer.
|
void |
copyFrom(NSoundFormat srcSoundFormat,
int srcSampleRate,
int srcSampleCount,
ByteBuffer srcSamples,
int sampleIndex,
int flags)
Copies data from the specified sound buffer to the current sound buffer.
|
void |
copyFrom(NSoundFormat srcSoundFormat,
int srcSampleRate,
int srcSampleCount,
ByteBuffer srcSamples,
int srcSampleIndex,
int sampleIndex,
int sampleCount)
Copies data from the specified sound buffer to the current sound buffer.
|
void |
copyFrom(NSoundFormat srcSoundFormat,
int srcSampleRate,
int srcSampleCount,
ByteBuffer srcSamples,
int srcSampleIndex,
int sampleIndex,
int sampleCount,
int flags)
Copies data from the specified sound buffer to the current sound buffer.
|
void |
copyFrom(NSoundFormat srcSoundFormat,
int srcSampleRate,
Object srcMinValue,
Object srcMaxValue,
int srcSampleCount,
ByteBuffer srcSamples,
int srcSampleIndex,
int sampleIndex,
int sampleCount,
int flags)
Copies data from the specified sound buffer to the current sound buffer.
|
void |
copyTo(int sampleIndex,
NSoundFormat dstSoundFormat,
int dstSampleRate,
int dstSampleCount,
ByteBuffer dstSamples,
int dstSampleIndex,
int sampleCount)
Copies sound buffer to ByteBuffer.
|
void |
copyTo(int sampleIndex,
NSoundFormat dstSoundFormat,
int dstSampleRate,
int dstSampleCount,
ByteBuffer dstSamples,
int dstSampleIndex,
int sampleCount,
int flags)
Copies sound buffer to ByteBuffer.
|
void |
copyTo(int sampleIndex,
NSoundFormat dstSoundFormat,
int dstSampleRate,
Object dstMinValue,
Object dstMaxValue,
int dstSampleCount,
ByteBuffer dstSamples,
int dstSampleIndex,
int sampleCount,
int flags)
Copies sound buffer to ByteBuffer.
|
void |
copyTo(NSoundBuffer dstSoundBuffer,
int dstSampleIndex)
Copies sound buffer to destination sound buffer.
|
void |
copyTo(NSoundFormat dstSoundFormat,
int dstSampleRate,
int dstSampleCount,
ByteBuffer dstSamples,
int dstSampleIndex)
Copies sound buffer to ByteBuffer.
|
void |
copyTo(NSoundFormat dstSoundFormat,
int dstSampleRate,
int dstSampleCount,
ByteBuffer dstSamples,
int dstSampleIndex,
int flags)
Copies sound buffer to ByteBuffer.
|
static NSoundBuffer |
create(NSoundFormat soundFormat,
int sampleRate,
int sampleCount)
Creates NSoundBuffer object wrapper.
|
static NSoundBuffer |
create(NSoundFormat soundFormat,
int sampleRate,
int sampleCount,
int flags)
Creates NSoundBuffer object wrapper.
|
NSoundBuffer |
crop(int sampleIndex,
int sampleCount)
Crops sound buffer.
|
static NSoundBuffer |
fromAudioSample(NAudioFormat format,
byte[] sample) |
static NSoundBuffer |
fromAudioSample(NAudioFormat format,
com.neurotec.io.NBuffer sample) |
static NSoundBuffer |
fromChannel(ReadableByteChannel ch)
Deprecated.
|
static NSoundBuffer |
fromChannel(ReadableByteChannel ch,
int flags)
Deprecated.
|
static NSoundBuffer |
fromData(NSoundFormat soundFormat,
int sampleRate,
int sampleCount,
ByteBuffer samples)
Creates NSoundBuffer object wrapper.
|
static NSoundBuffer |
fromData(NSoundFormat soundFormat,
int sampleRate,
int sampleCount,
ByteBuffer samples,
int flags)
Creates NSoundBuffer object wrapper.
|
static NSoundBuffer |
fromData(NSoundFormat soundFormat,
int sampleRate,
int srcSampleCount,
ByteBuffer samples,
int sampleIndex,
int sampleCount)
Creates sound buffer from ByteBuffer.
|
static NSoundBuffer |
fromData(NSoundFormat soundFormat,
int sampleRate,
int srcSampleCount,
ByteBuffer samples,
int sampleIndex,
int sampleCount,
int flags)
Creates sound buffer from ByteBuffer.
|
static NSoundBuffer |
fromFile(String fileName)
Creates a sound buffer from the specified file.
|
static NSoundBuffer |
fromFile(String fileName,
int flags)
Creates a sound buffer from the specified file.
|
static NSoundBuffer |
fromInputStream(InputStream in)
Deprecated.
|
static NSoundBuffer |
fromInputStream(InputStream in,
int flags)
Deprecated.
|
static NSoundBuffer |
fromMemory(ByteBuffer buffer)
Creates a sound buffer from the specified byte buffer.
|
static NSoundBuffer |
fromMemory(com.neurotec.io.NBuffer buffer)
Creates a sound buffer from the specified NBuffer.
|
static NSoundBuffer |
fromMemory(com.neurotec.io.NBuffer buffer,
int flags)
Creates a sound buffer from the specified NBuffer.
|
static NSoundBuffer |
fromSoundBuffer(NSoundFormat soundFormat,
NSoundBuffer srcSoundBuffer)
Creates sound buffer from another sound buffer.
|
static NSoundBuffer |
fromSoundBuffer(NSoundFormat soundFormat,
NSoundBuffer srcSoundBuffer,
int flags)
Creates sound buffer from another sound buffer.
|
static NSoundBuffer |
fromSoundBuffer(NSoundFormat soundFormat,
NSoundBuffer srcSoundBuffer,
int sampleIndex,
int sampleCount)
Creates sound buffer from another sound buffer.
|
static NSoundBuffer |
fromSoundBuffer(NSoundFormat soundFormat,
NSoundBuffer srcSoundBuffer,
int sampleIndex,
int sampleCount,
int flags)
Creates sound buffer from another sound buffer.
|
static NSoundBuffer |
fromStream(com.neurotec.io.NStream stream) |
static NSoundBuffer |
fromStream(com.neurotec.io.NStream stream,
int flags) |
int |
getCapacity()
Gets the number of samples that the sound buffer can contain.
|
int |
getLength()
Gets the number of samples actually contained in the sound buffer.
|
long |
getLongSamplesSize()
Gets the size of sound buffer.
|
Object |
getMaxValue()
Retrieves the maximum sound sample value of the sound buffer.
|
Object |
getMinValue()
Retrieves the minimum sound sample value of the sound buffer.
|
Object |
getSample(int sampleIndex)
Retrieves the specified sample from the sound buffer.
|
int |
getSampleRate()
Gets the number of samples per second.
|
com.neurotec.io.NBuffer |
getSamples()
Gets the memory block containing samples.
|
int |
getSamplesSize()
Gets the size of sound buffer.
|
NSoundFormat |
getSoundFormat()
Gets NSoundFormat.
|
static int[] |
getSupportedAudioSubtypes() |
static NSoundBuffer |
getWrapper(NSoundBuffer srcSoundBuffer,
int sampleIndex,
int sampleCount)
Creates NSoundBuffer object wrapper.
|
static NSoundBuffer |
getWrapper(NSoundBuffer srcSoundBuffer,
int sampleIndex,
int sampleCount,
int flags)
Creates NSoundBuffer object wrapper.
|
static NSoundBuffer |
getWrapper(NSoundFormat soundFormat,
int sampleRate,
int sampleCount,
com.neurotec.io.NBuffer samples)
Creates NSoundBuffer object wrapper.
|
static NSoundBuffer |
getWrapper(NSoundFormat soundFormat,
int sampleRate,
int sampleCount,
com.neurotec.io.NBuffer samples,
int flags)
Creates NSoundBuffer object wrapper.
|
static NSoundBuffer |
getWrapper(NSoundFormat soundFormat,
int sampleRate,
int srcSampleCount,
com.neurotec.io.NBuffer samples,
int sampleIndex,
int sampleCount)
Creates NSoundBuffer object wrapper.
|
static NSoundBuffer |
getWrapper(NSoundFormat soundFormat,
int sampleRate,
int srcSampleCount,
com.neurotec.io.NBuffer samples,
int sampleIndex,
int sampleCount,
int flags)
Creates NSoundBuffer object wrapper.
|
static boolean |
isAudioFormatSupported(NAudioFormat format) |
static boolean |
isAudioSubtypeSupported(int value) |
static com.neurotec.lang.NType |
nativeTypeOf()
Retrieves the native type for the enclosing class.
|
com.neurotec.io.NBuffer |
save(com.neurotec.lang.NObject reserved)
Saves the sound buffer into a byte buffer.
|
com.neurotec.io.NBuffer |
save(com.neurotec.lang.NObject reserved,
int flags)
Saves the sound buffer into a byte buffer.
|
void |
save(com.neurotec.io.NStream stream,
com.neurotec.lang.NObject reserved) |
void |
save(com.neurotec.io.NStream stream,
com.neurotec.lang.NObject reserved,
int flags) |
void |
save(OutputStream out,
com.neurotec.lang.NObject reserved)
Deprecated.
|
void |
save(OutputStream out,
com.neurotec.lang.NObject reserved,
int flags)
Deprecated.
|
void |
save(String fileName)
Saves the sound buffer into the specified file.
|
void |
save(String fileName,
com.neurotec.lang.NObject reserved,
int flags)
Saves the sound buffer into the specified file.
|
void |
save(WritableByteChannel ch,
com.neurotec.lang.NObject reserved)
Deprecated.
|
void |
save(WritableByteChannel ch,
com.neurotec.lang.NObject reserved,
int flags)
Deprecated.
|
void |
setCapacity(int value)
Sets the number of samples that the sound buffer can contain.
|
void |
setLength(int value)
Sets the number of samples that the sound buffer contains.
|
void |
setMaxValue(Object value)
Sets the maximum sound sample value of the sound buffer.
|
void |
setMinValue(Object value)
Sets the minimum sound sample value of the sound buffer.
|
void |
setSample(int sampleIndex,
Object value)
Sets the specified sample in the sound buffer to the specified value.
|
addListener, addPropertyChangeListener, captureProperties, claimHandle, clone, compareTo, copyProperties, dispose, disposeArray, equals, fromHandle, fromHandle, fromObject, getFlags, getHandle, getNativeType, getOwner, getProperty, getProperty, getSize, getSize, getSizeMany, getSizeMany, hashCode, invoke, invoke, invoke, isDisposed, nObjectCallbackNativeTypeOf, nObjectPropertyChangedCallbackNativeTypeOf, ref, removeListener, removePropertyChangeListener, reset, resetProperty, save, save, save, save, save, save, save, save, save, save, save, save, saveMany, saveMany, saveMany, saveMany, saveMany, saveMany, saveMany, saveMany, saveMany, saveMany, saveMany, saveMany, setFlags, setProperty, setProperty, toHandle, toObject, toString, toString, unref, unrefArray, unrefElementspublic static final int FLAG_ALL_DST
public static final int FLAG_ALL_SRC
public static final int FLAG_ALL_DST_AND_SRC
public static com.neurotec.lang.NType nativeTypeOf()
public static void copy(NSoundBuffer srcSoundBuffer, int sampleIndex, NSoundBuffer dstSoundBuffer, int dstSampleIndex, int sampleCount)
srcSoundBuffer - NSoundBuffer object to copy.sampleIndex - Start of the interval to copy.dstSoundBuffer - A destination NSoundBuffer object.
Specified interval will be copied to this object.dstSampleIndex - The index in the destination sample array where to copy.sampleCount - Count of samples to copy.IllegalArgumentException - srcSoundBuffer or dstSoundBuffer has null value.public static void copy(NSoundFormat srcSoundFormat, int srcSampleRate, Object srcMinValue, Object srcMaxValue, int srcSampleCount, ByteBuffer srcSamples, int srcSampleIndex, NSoundFormat dstSoundFormat, int dstSampleRate, Object dstMinValue, Object dstMaxValue, int dstSampleCount, ByteBuffer dstSamples, int dstSampleIndex, int sampleCount, int flags)
srcSoundFormat - NSoundFormat object to copy.srcSampleRate - Source sample rate.srcMinValue - The minimum sound sample value of the source sound buffer.srcMaxValue - The maximum sound sample value of the source sound buffer.srcSampleCount - Source sample count.srcSamples - Source sound buffer.srcSampleIndex - Source sound buffer index.dstSoundFormat - Destination sound format.dstSampleRate - Destination sample rate.dstSampleCount - Destination sample count.dstSamples - Destination sound buffer.dstSampleIndex - Destination sound buffer index.sampleCount - The number of samples to be copied to the destination sound buffer.public static void copy(NSoundFormat srcSoundFormat, int srcSampleRate, int srcSampleCount, ByteBuffer srcSamples, int srcSampleIndex, NSoundFormat dstSoundFormat, int dstSampleRate, int dstSampleCount, ByteBuffer dstSamples, int dstSampleIndex, int sampleCount)
srcSoundFormat - NSoundFormat object to copy.srcSampleRate - Source sample rate.srcSampleCount - Source sample count.srcSamples - Source sound buffer.srcSampleIndex - Source sound buffer index.dstSoundFormat - Destination sound format.dstSampleRate - Destination sample rate.dstSampleCount - Destination sample count.dstSamples - Destination sound buffer.dstSampleIndex - Destination sound buffer index.sampleCount - The number of samples to be copied to the destination sound buffer.public static void copy(NSoundFormat srcSoundFormat, int srcSampleRate, int srcSampleCount, ByteBuffer srcSamples, int srcSampleIndex, NSoundFormat dstSoundFormat, int dstSampleRate, int dstSampleCount, ByteBuffer dstSamples, int dstSampleIndex, int sampleCount, int flags)
srcSoundFormat - Source sound format.srcSampleRate - Source sample rate.srcSampleCount - Source sample count.srcSamples - Source sound buffer.srcSampleIndex - Source sound buffer index.dstSoundFormat - Destination sound format.dstSampleRate - Destination sample rate.dstSampleCount - Destination sample count.dstSamples - Destination sound buffer.dstSampleIndex - Destination sound buffer index.sampleCount - The number of samples to be copied to the destination sound buffer.flags - Associated flags. Reserved; must be zero.public static NSoundBuffer getWrapper(NSoundFormat soundFormat, int sampleRate, int sampleCount, com.neurotec.io.NBuffer samples)
soundFormat - The buffer sound format.sampleRate - The buffer sample rate.sampleCount - The sample count to wrap.samples - The buffer with sound data.public static NSoundBuffer getWrapper(NSoundFormat soundFormat, int sampleRate, int sampleCount, com.neurotec.io.NBuffer samples, int flags)
soundFormat - The buffer sound format.sampleRate - The buffer sample rate.sampleCount - The sample count to wrap.samples - The buffer with sound data.flags - Bitwise combination of zero or
more flags that controls behavior of the function.
This parameter is reserved, must be zero.public static NSoundBuffer getWrapper(NSoundFormat soundFormat, int sampleRate, int srcSampleCount, com.neurotec.io.NBuffer samples, int sampleIndex, int sampleCount)
soundFormat - The buffer sound format.sampleRate - The buffer sample rate.srcSampleCount - The source sample count.samples - The buffer with sound data.sampleIndex - Starting point in buffer from
witch to create sound buffer wrapper.sampleCount - The sample count to wrap.public static NSoundBuffer getWrapper(NSoundFormat soundFormat, int sampleRate, int srcSampleCount, com.neurotec.io.NBuffer samples, int sampleIndex, int sampleCount, int flags)
soundFormat - The buffer sound format.sampleRate - The buffer sample rate.srcSampleCount - The source sample count.samples - The buffer with sound data.sampleIndex - Starting point in buffer from
witch to create sound buffer wrapper.sampleCount - The sample count to wrap.flags - Bitwise combination of zero or
more flags that controls behavior of the function.
This parameter is reserved, must be zero.public static NSoundBuffer getWrapper(NSoundBuffer srcSoundBuffer, int sampleIndex, int sampleCount)
srcSoundBuffer - Sound buffer that can be wrapped.sampleIndex - Starting point in buffer from
witch to create sound buffer wrapper.sampleCount - The sample count to wrap.public static NSoundBuffer getWrapper(NSoundBuffer srcSoundBuffer, int sampleIndex, int sampleCount, int flags)
srcSoundBuffer - Sound buffer that can be wrapped.sampleIndex - Starting point in buffer from
witch to create sound buffer wrapper.sampleCount - The sample count to wrap.flags - Bitwise combination of zero or
more flags that controls behavior of the function.
This parameter is reserved, must be zero.public static NSoundBuffer create(NSoundFormat soundFormat, int sampleRate, int sampleCount)
soundFormat - One of the values NSoundFormat.sampleRate - The buffer sample rate.sampleCount - The buffer sample count.public static NSoundBuffer create(NSoundFormat soundFormat, int sampleRate, int sampleCount, int flags)
soundFormat - One of the values NSoundFormat.sampleRate - The buffer sample rate.sampleCount - The buffer sample count.flags - Bitwise combination of zero or
more flags that controls behavior of the function.
This parameter is reserved, must be zero.public static NSoundBuffer fromData(NSoundFormat soundFormat, int sampleRate, int sampleCount, ByteBuffer samples)
soundFormat - One of the values NSoundFormat.sampleRate - The buffer sample rate.sampleCount - The buffer sample count.samples - The buffer with sound data.public static NSoundBuffer fromData(NSoundFormat soundFormat, int sampleRate, int sampleCount, ByteBuffer samples, int flags)
soundFormat - One of the values NSoundFormat.sampleRate - The buffer sample rate.sampleCount - The buffer sample count.samples - The buffer with sound data.flags - Bitwise combination of zero or
more flags that controls behavior of the function.
This parameter is reserved, must be zero.public static NSoundBuffer fromData(NSoundFormat soundFormat, int sampleRate, int srcSampleCount, ByteBuffer samples, int sampleIndex, int sampleCount)
soundFormat - The buffer sound format.sampleRate - The buffer sample rate.srcSampleCount - The source sample count.samples - The buffer with sound data.sampleIndex - Starting point in buffer from
witch to create sound buffer wrapper.sampleCount - The sample count to wrap.public static NSoundBuffer fromData(NSoundFormat soundFormat, int sampleRate, int srcSampleCount, ByteBuffer samples, int sampleIndex, int sampleCount, int flags)
soundFormat - The buffer sound format.sampleRate - The buffer sample rate.srcSampleCount - The source sample count.samples - The buffer with sound data.sampleIndex - Starting point in buffer from
witch to create sound buffer wrapper.sampleCount - The sample count to wrap.flags - Bitwise combination of zero or
more flags that controls behavior of the function.
This parameter is reserved, must be zero.public static NSoundBuffer fromSoundBuffer(NSoundFormat soundFormat, NSoundBuffer srcSoundBuffer)
soundFormat - The buffer sound format.srcSoundBuffer - The sound buffer.public static NSoundBuffer fromSoundBuffer(NSoundFormat soundFormat, NSoundBuffer srcSoundBuffer, int flags)
soundFormat - The buffer sound format.srcSoundBuffer - The sound buffer.flags - Bitwise combination of zero or
more flags that controls behavior of the function.
This parameter is reserved, must be zero.public static NSoundBuffer fromSoundBuffer(NSoundFormat soundFormat, NSoundBuffer srcSoundBuffer, int sampleIndex, int sampleCount)
soundFormat - The buffer sound format.srcSoundBuffer - The sound buffer.sampleIndex - Starting point in buffer from witch to create sound buffer.sampleCount - The sample count to create in sound buffer.public static NSoundBuffer fromSoundBuffer(NSoundFormat soundFormat, NSoundBuffer srcSoundBuffer, int sampleIndex, int sampleCount, int flags)
soundFormat - The buffer sound format.srcSoundBuffer - The sound buffer.sampleIndex - Starting point in buffer from witch to create sound buffer.sampleCount - The sample count to create in sound buffer.flags - Bitwise combination of zero or
more flags that controls behavior of the function.
This parameter is reserved, must be zero.public static NSoundBuffer fromFile(String fileName) throws IOException
fileName - The name of the file.IOExceptionpublic static NSoundBuffer fromFile(String fileName, int flags) throws IOException
fileName - The name of the file.flags - Reserved; must be zero.IOExceptionpublic static NSoundBuffer fromMemory(ByteBuffer buffer)
buffer - The byte buffer.public static NSoundBuffer fromMemory(com.neurotec.io.NBuffer buffer)
buffer - The NBuffer.public static NSoundBuffer fromMemory(com.neurotec.io.NBuffer buffer, int flags)
buffer - The NBuffer.flags - Reserved; must be zero.@Deprecated public static NSoundBuffer fromInputStream(InputStream in) throws IOException
in - The input stream.IOException@Deprecated public static NSoundBuffer fromInputStream(InputStream in, int flags) throws IOException
in - The input stream.flags - Reserved; must be zero.IOException@Deprecated public static NSoundBuffer fromChannel(ReadableByteChannel ch) throws IOException
ch - The byte channel.IOException@Deprecated public static NSoundBuffer fromChannel(ReadableByteChannel ch, int flags) throws IOException
ch - The byte channel.flags - Reserved; must be zero.IOExceptionpublic static NSoundBuffer fromStream(com.neurotec.io.NStream stream) throws IOException
IOExceptionpublic static NSoundBuffer fromStream(com.neurotec.io.NStream stream, int flags) throws IOException
IOExceptionpublic static int[] getSupportedAudioSubtypes()
public static boolean isAudioSubtypeSupported(int value)
public static boolean isAudioFormatSupported(NAudioFormat format)
public static NSoundBuffer fromAudioSample(NAudioFormat format, com.neurotec.io.NBuffer sample)
public static NSoundBuffer fromAudioSample(NAudioFormat format, byte[] sample)
public void copyFrom(NSoundFormat srcSoundFormat, int srcSampleRate, int srcSampleCount, ByteBuffer srcSamples, int sampleIndex)
srcSoundFormat - Source sound format.srcSampleRate - Source sample rate.srcSampleCount - Source sample count.srcSamples - Buffer containing source samples.sampleIndex - Sample index.public void copyFrom(NSoundFormat srcSoundFormat, int srcSampleRate, int srcSampleCount, ByteBuffer srcSamples, int sampleIndex, int flags)
srcSoundFormat - Source sound format.srcSampleRate - Source sample rate.srcSampleCount - Source sample count.srcSamples - Buffer containing source samples.sampleIndex - Sample index.flags - Reserved, must be zero.public void copyFrom(NSoundFormat srcSoundFormat, int srcSampleRate, int srcSampleCount, ByteBuffer srcSamples, int srcSampleIndex, int sampleIndex, int sampleCount)
srcSoundFormat - Source sound format.srcSampleRate - Source sample rate.srcSampleCount - Source sample count.srcSamples - Buffer containing source samples.srcSampleIndex - Source sample index.sampleIndex - Sample index.sampleCount - Sample count.public void copyFrom(NSoundFormat srcSoundFormat, int srcSampleRate, int srcSampleCount, ByteBuffer srcSamples, int srcSampleIndex, int sampleIndex, int sampleCount, int flags)
srcSoundFormat - Source sound format.srcSampleRate - Source sample rate.srcSampleCount - Source sample count.srcSamples - Buffer containing source samples.srcSampleIndex - Source sample index.sampleIndex - Sample index.sampleCount - Sample count.flags - Reserved, must be zero.public void copyFrom(NSoundFormat srcSoundFormat, int srcSampleRate, Object srcMinValue, Object srcMaxValue, int srcSampleCount, ByteBuffer srcSamples, int srcSampleIndex, int sampleIndex, int sampleCount, int flags)
srcSoundFormat - Source sound format.srcSampleRate - Source sample rate.srcMinValue - The minimum sound sample value of the source sound buffer.srcMaxValue - The maximum sound sample value of the source sound buffer.srcSampleCount - Source sample count.srcSamples - Buffer containing source samples.srcSampleIndex - Source sample index.sampleIndex - Sample index.sampleCount - Sample count.flags - Reserved, must be zero.public void append(NSoundBuffer soundBuffer)
soundBuffer - The sound buffer to append.public void append(NSoundFormat soundFormat, int sampleRate, int sampleCount, ByteBuffer samples)
soundFormat - The buffer sound format.sampleRate - The buffer sample rate.sampleCount - The buffer sound count.samples - The buffer with sound data.public void append(NSoundFormat soundFormat, int sampleRate, int sampleCount, ByteBuffer samples, int flags)
soundFormat - The buffer sound format.sampleRate - The buffer sample rate.sampleCount - The buffer sound count.samples - The buffer with sound data.flags - Bitwise combination of zero or more flags
that controls behavior of the function.
This parameter is reserved, must be zero.public void append(NSoundFormat soundFormat, int sampleRate, Object minValue, Object maxValue, int sampleCount, ByteBuffer samples, int flags)
soundFormat - The buffer sound format.sampleRate - The buffer sample rate.minValue - The minimum sound sample value of the sound buffer.maxValue - The maximum sound sample value of the sound buffer.sampleCount - The buffer sound count.samples - The buffer with sound data.flags - Bitwise combination of zero or more flags
that controls behavior of the function.
This parameter is reserved, must be zero.public void clear()
public void copyTo(NSoundBuffer dstSoundBuffer, int dstSampleIndex)
dstSoundBuffer - The destination sound buffer.dstSampleIndex - The index in the destination buffer where to copy.public void copyTo(NSoundFormat dstSoundFormat, int dstSampleRate, int dstSampleCount, ByteBuffer dstSamples, int dstSampleIndex)
dstSoundFormat - The destination buffer sound format.dstSampleCount - The destination buffer sample count.dstSamples - The destination buffer.dstSampleIndex - The index in the destination buffer where to copy.public void copyTo(NSoundFormat dstSoundFormat, int dstSampleRate, int dstSampleCount, ByteBuffer dstSamples, int dstSampleIndex, int flags)
dstSoundFormat - The destination buffer sound format.dstSampleCount - The destination buffer sample count.dstSamples - The destination buffer.dstSampleIndex - The index in the destination buffer where to copy.flags - Bitwise combination of zero or more flags
that controls behavior of the function.
This parameter is reserved, must be zero.public void copyTo(int sampleIndex,
NSoundFormat dstSoundFormat,
int dstSampleRate,
int dstSampleCount,
ByteBuffer dstSamples,
int dstSampleIndex,
int sampleCount)
sampleIndex - The sample index.dstSoundFormat - The destination buffer sound format.dstSampleRate - The destination buffer sample rate.dstSampleCount - The destination buffer sample count.dstSamples - The destination buffer.dstSampleIndex - The index in the destination buffer where to copy.sampleCount - The sample count.public void copyTo(int sampleIndex,
NSoundFormat dstSoundFormat,
int dstSampleRate,
int dstSampleCount,
ByteBuffer dstSamples,
int dstSampleIndex,
int sampleCount,
int flags)
sampleIndex - The sample index.dstSoundFormat - The destination buffer sound format.dstSampleRate - The destination buffer sample rate.dstSampleCount - The destination buffer sample count.dstSamples - The destination buffer.dstSampleIndex - The index in the destination buffer where to copy.sampleCount - The sample count.flags - Reserved, must be zero.public void copyTo(int sampleIndex,
NSoundFormat dstSoundFormat,
int dstSampleRate,
Object dstMinValue,
Object dstMaxValue,
int dstSampleCount,
ByteBuffer dstSamples,
int dstSampleIndex,
int sampleCount,
int flags)
sampleIndex - The sample index.dstSoundFormat - The destination buffer sound format.dstMinValue - The minimum sound sample value of the destination sound buffer.dstMaxValue - The maximum sound sample value of the destination sound buffer.dstSampleCount - The destination buffer sample count.dstSamples - The destination buffer.dstSampleIndex - The index in the destination buffer where to copy.sampleCount - The sample count.flags - Reserved, must be zero.public NSoundBuffer crop(int sampleIndex, int sampleCount)
sampleIndex - The index in the sample array where to copy.sampleCount - The buffer sample count.public final void save(String fileName) throws IOException
fileName - The name of the file.IOExceptionpublic final void save(String fileName, com.neurotec.lang.NObject reserved, int flags) throws IOException
fileName - The name of the file.reserved - Reserved for future use.flags - Reserved; must be zero.IOExceptionpublic com.neurotec.io.NBuffer save(com.neurotec.lang.NObject reserved)
reserved - Reserved for future use.public com.neurotec.io.NBuffer save(com.neurotec.lang.NObject reserved,
int flags)
reserved - Reserved for future use.flags - Reserved; must be zero.@Deprecated public final void save(OutputStream out, com.neurotec.lang.NObject reserved) throws IOException
out - The output stream.reserved - Reserved for future use.IOException@Deprecated public final void save(OutputStream out, com.neurotec.lang.NObject reserved, int flags) throws IOException
out - The output stream.reserved - Reserved for future use.flags - Reserved; must be zero.IOException@Deprecated public final void save(WritableByteChannel ch, com.neurotec.lang.NObject reserved) throws IOException
ch - The byte channel.reserved - Reserved for future use.IOException@Deprecated public final void save(WritableByteChannel ch, com.neurotec.lang.NObject reserved, int flags) throws IOException
ch - The byte channel.reserved - Reserved for future use.IOExceptionpublic final void save(com.neurotec.io.NStream stream,
com.neurotec.lang.NObject reserved)
throws IOException
IOExceptionpublic final void save(com.neurotec.io.NStream stream,
com.neurotec.lang.NObject reserved,
int flags)
throws IOException
IOExceptionpublic NSoundFormat getSoundFormat()
public final Object getMinValue()
public final void setMinValue(Object value)
value - The minimum sound sample value.public final Object getMaxValue()
public final void setMaxValue(Object value)
value - The maximum sound sample value.public int getSampleRate()
public int getLength()
public void setLength(int value)
value - The number of samples that the sound buffer contains.public int getCapacity()
public void setCapacity(int value)
value - The number of samples that the sound buffer can contain.public final Object getSample(int sampleIndex)
sampleIndex - The index of the sample.public final void setSample(int sampleIndex,
Object value)
sampleIndex - The index of the sample.value - New sample value.public int getSamplesSize()
public long getLongSamplesSize()
public final com.neurotec.io.NBuffer getSamples()
Copyright © 2016 Neurotechnology. All rights reserved.