Lines Matching refs:AudioTrack

6 import android.media.AudioTrack;
10 * Exposes parts of the {@link AudioTrack} API by delegating calls to an
11 * underlying {@link AudioTrack}. Additionally, provides methods like
22 * The minimum increment of time to wait for an AudioTrack to finish
28 * The maximum increment of time to sleep while waiting for an AudioTrack
41 * Minimum size of the buffer of the underlying {@link android.media.AudioTrack}
58 * {@link AudioTrack#stop()} to send pending buffers to the mixer, and slightly
73 private AudioTrack mAudioTrack;
96 AudioTrack track = createStreamingAudioTrack();
118 AudioTrack track = null;
133 AudioTrack track = null;
164 // The last call to AudioTrack.write( ) will return only after
192 private static int writeToAudioTrack(AudioTrack audioTrack, byte[] bytes) {
193 if (audioTrack.getPlayState() != AudioTrack.PLAYSTATE_PLAYING) {
194 if (DBG) Log.d(TAG, "AudioTrack not playing, restarting : " + audioTrack.hashCode());
211 private AudioTrack createStreamingAudioTrack() {
215 = AudioTrack.getMinBufferSize(mSampleRateInHz, channelConfig, mAudioFormat);
218 AudioTrack audioTrack = new AudioTrack(mStreamType, mSampleRateInHz, channelConfig,
219 mAudioFormat, bufferSizeInBytes, AudioTrack.MODE_STREAM);
220 if (audioTrack.getState() != AudioTrack.STATE_INITIALIZED) {
243 private void blockUntilDone(AudioTrack audioTrack) {
249 // In this case we would have called AudioTrack#stop() to flush
279 private void blockUntilCompletion(AudioTrack audioTrack) {
287 audioTrack.getPlayState() == AudioTrack.PLAYSTATE_PLAYING && !mStopped) {
303 "for AudioTrack to make progress, Aborting");
324 private static void setupVolume(AudioTrack audioTrack, float volume, float pan) {
336 if (audioTrack.setStereoVolume(volLeft, volRight) != AudioTrack.SUCCESS) {