Lines Matching defs:AudioTrack

28  * The AudioTrack class manages and plays a single audio resource for Java applications.
30 * achieved by "pushing" the data to the AudioTrack object using one of the
33 * <p>An AudioTrack instance can operate under two modes: static or streaming.<br>
34 * In Streaming mode, the application writes a continuous stream of data to the AudioTrack, using
51 * <p>Upon creation, an AudioTrack object initializes its associated audio buffer.
52 * The size of this buffer, specified during the construction, determines how long an AudioTrack
54 * For an AudioTrack using the static mode, this size is the maximum size of the sound that can
59 * AudioTrack is not final and thus permits subclasses, but such use is not recommended.
61 public class AudioTrack
76 /** indicates AudioTrack state is stopped */
78 /** indicates AudioTrack state is paused */
80 /** indicates AudioTrack state is playing */
96 * State of an AudioTrack that was not successfully initialized upon creation.
100 * State of an AudioTrack that is ready to be used.
104 * State of a successfully initialized AudioTrack that uses static data,
135 // to keep in sync with frameworks/av/include/media/AudioTrack.h
145 private final static String TAG = "android.media.AudioTrack";
152 * Indicates the state of the AudioTrack instance.
156 * Indicates the play state of the AudioTrack instance.
173 * Looper associated with the thread that creates the AudioTrack instance.
221 * Accessed by native methods: provides access to C++ AudioTrack object.
227 * the native AudioTrack object, but not stored in it).
257 * for the successful creation of an AudioTrack instance in streaming mode. Using values
262 public AudioTrack(int streamType, int sampleRateInHz, int channelConfig, int audioFormat,
270 * Class constructor with audio session. Use this constructor when the AudioTrack must be
272 * associate audio effects to a particular instance of AudioTrack: if an audio session ID
275 * When an AudioTrack is created without specifying a session, it will create its own session
277 * If a non-zero session ID is provided, this AudioTrack will share effects attached to this
293 * from for playback. If using the AudioTrack in streaming mode, you can write data into
294 * this buffer in smaller chunks than this size. If using the AudioTrack in static mode,
297 * for the successful creation of an AudioTrack instance in streaming mode. Using values
300 * @param sessionId Id of audio session the AudioTrack must be attached to
303 public AudioTrack(int streamType, int sampleRateInHz, int channelConfig, int audioFormat,
308 // remember which looper is associated with the AudioTrack instantiation
326 int initResult = native_setup(new WeakReference<AudioTrack>(this),
330 loge("Error code "+initResult+" when initializing AudioTrack.");
436 * @return false if the AudioTrack can't be used with such a mask
486 * Releases the native AudioTrack resources.
489 // even though native_release() stops the native AudioTrack, we need to stop
490 // AudioTrack subclasses too.
549 * Returns the type of audio stream this AudioTrack is configured for.
576 * Returns the state of the AudioTrack instance. This is useful after the
577 * AudioTrack instance has been created to check if it was initialized
588 * Returns the playback state of the AudioTrack instance.
607 * @deprecated Only accessible by subclasses, which are not recommended for AudioTrack.
647 * to AudioTrack buffer size, AudioMixer (if any) and audio hardware driver.
665 * Returns the minimum buffer size required for the successful creation of an AudioTrack
669 * For example, if you intend to dynamically set the source sample rate of an AudioTrack
729 * @return the ID of the audio session this AudioTrack belongs to.
778 * Sets the listener the AudioTrack notifies when a previously set marker is reached or
780 * Notifications will be received in the same thread as the one in which the AudioTrack
789 * Sets the listener the AudioTrack notifies when a previously set marker is reached or
791 * Use this method to receive AudioTrack events in the Handler associated with another
792 * thread than the one in which you created the AudioTrack instance.
808 * Sets the specified left/right output volume values on the AudioTrack. Values are clamped
854 * {@link #AudioTrack(int, int, int, int, int, int)} constructor),
961 * in an AudioTrack subclass constructor to set a subclass-specific post-initialization state.
962 * However, subclasses of AudioTrack are no longer recommended, so this method is obsolete.
963 * @param state the state of the AudioTrack instance
964 * @deprecated Only accessible by subclasses, which are not recommended for AudioTrack.
976 * Starts playing an AudioTrack.
984 throw new IllegalStateException("play() called on uninitialized AudioTrack.");
1004 throw new IllegalStateException("stop() called on uninitialized AudioTrack.");
1024 throw new IllegalStateException("pause() called on uninitialized AudioTrack.");
1217 * an AudioTrack has reached a notification marker or has increased by a certain period.
1224 void onMarkerReached(AudioTrack track);
1230 void onPeriodicNotification(AudioTrack track);
1244 NativeEventHandlerDelegate(final AudioTrack track,
1252 // no given handler, use the looper the AudioTrack was created in
1300 AudioTrack track = (AudioTrack)((WeakReference)audiotrack_ref).get();