Package games.stendhal.common.math
Class Dsp
java.lang.Object
games.stendhal.common.math.Dsp
Signal processing algorithms.
- Author:
- silvio
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
blendAudioData(float[] result, int rOffset, float[] samples, int sOffset, int numSamples, float intensity)
static float[]
convertChannels(float[] samples, int numFrames, int numChannels, int numRequiredChannels)
static float[]
convertSampleRate(float[] samples, int numFrames, int numChannels, int sampleRate, int targetSampleRate)
Convert the sample rate of a multi channel PCM signal.static byte[]
convertUniformPCM(byte[] pcmBuffer, float[] samples, int numSamples, int numBytesPerSample)
static void
mixAudioData(float[] result, int rOffset, float[] samples, int sOffset, int numSamples, float intensity)
-
Constructor Details
-
Dsp
public Dsp()
-
-
Method Details
-
convertUniformPCM
public static byte[] convertUniformPCM(byte[] pcmBuffer, float[] samples, int numSamples, int numBytesPerSample) -
mixAudioData
public static void mixAudioData(float[] result, int rOffset, float[] samples, int sOffset, int numSamples, float intensity) -
blendAudioData
public static void blendAudioData(float[] result, int rOffset, float[] samples, int sOffset, int numSamples, float intensity) -
convertChannels
public static float[] convertChannels(float[] samples, int numFrames, int numChannels, int numRequiredChannels) -
convertSampleRate
public static float[] convertSampleRate(float[] samples, int numFrames, int numChannels, int sampleRate, int targetSampleRate)Convert the sample rate of a multi channel PCM signal.- Parameters:
samples
-numFrames
-numChannels
-sampleRate
-targetSampleRate
-- Returns:
- converted sample rate
-