AudioTrack.java 1017 B

12345678910111213141516171819202122232425262728293031323334
  1. package android.media;
  2. @SimpleCClassName
  3. @IncludeUtil
  4. public class AudioTrack {
  5. public AudioTrack(int streamType, int sampleRateInHz, int channelConfig, int audioFormat, int bufferSizeInBytes, int mode);
  6. public static int getMinBufferSize(int sampleRateInHz, int channelConfig, int audioFormat);
  7. public static float getMaxVolume();
  8. public static float getMinVolume();
  9. public static int getNativeOutputSampleRate(int streamType);
  10. public void play();
  11. public void pause();
  12. public void stop();
  13. public void flush();
  14. public void release();
  15. public int write(byte[] audioData, int offsetInBytes, int sizeInBytes);
  16. public int setStereoVolume(float leftGain, float rightGain);
  17. public int getAudioSessionId();
  18. @MinApi(23)
  19. public PlaybackParams getPlaybackParams();
  20. @MinApi(23)
  21. void setPlaybackParams(PlaybackParams params);
  22. int getStreamType();
  23. int getSampleRate();
  24. int getPlaybackRate();
  25. int setPlaybackRate(int sampleRateInHz);
  26. }