Code example for AudioTrack

Methods: setPlaybackRate

0
	} 
 
	public static void rate(final short id, final int rate) {
		AudioTrack audiotrack;
		if ((audiotrack = audiotracks.get(id)) != null) {
			audiotrack.setPlaybackRate(rate);
		} 
	} 
 
	public static int rate(final short id) {
		AudioTrack audiotrack;
		if ((audiotrack = audiotracks.get(id)) != null) {
			return audiotrack.getPlaybackRate();
		} 
		return 0; 
	} 
 
	public static void write(final short id, final int rate, final byte channels, final byte[] sample, final int length) {
		AudioTrack audiotrack;
		if ((audiotrack = audiotracks.get(id)) == null) {
			audiotrack = open(id, rate, channels,