Package soundPlayback
Class PBSampleRateData
java.lang.Object
soundPlayback.PBSampleRateData
Single class to hold everything we need to know about sample
rates.
Output sample rate will be the rate that data are being played back at at the device.
This will be the same as the data rate after decimation for a real time system
but may be different for a non-real time system that is playing faster or slower than real time.
- Author:
- dg50
-
Constructor Summary
ConstructorDescriptionPBSampleRateData
(double inputSampleRate, double outputSampleRate) PBSampleRateData
(double inputSampleRate, double outputSampleRate, double speedFactor) -
Method Summary
-
Constructor Details
-
PBSampleRateData
public PBSampleRateData(double inputSampleRate, double outputSampleRate, double speedFactor) - Parameters:
inputSampleRate
- Input sample rateoutputSampleRate
- Output sample ratespeedFactor
- Speed factor (how fast output will be compared to input)
-
PBSampleRateData
public PBSampleRateData(double inputSampleRate, double outputSampleRate) - Parameters:
inputSampleRate
- Input sample rateoutputSampleRate
- Output sample rate.
Decimation factor will be set to inputSampleRat / outputSampleRate
-
-
Method Details
-
getInputSampleRate
public double getInputSampleRate()- Returns:
- the inputSampleRate
-
getOutputSampleRate
public double getOutputSampleRate()- Returns:
- the outputSampleRate
-
getSpeedFactor
public double getSpeedFactor()- Returns:
- the speedFactor
-
getDecimationFactor
public double getDecimationFactor()- Returns:
- the decimationFactor
-
toString
-