Lines Matching defs:AudioRecord

33  * The AudioRecord class manages the audio resources for Java applications
35 * achieved by "pulling" (reading) the data from the AudioRecord object. The
36 * application is responsible for polling the AudioRecord object in time using one of
39 * on the audio data storage format that is the most convenient for the user of AudioRecord.
40 * <p>Upon creation, an AudioRecord object initializes its associated audio buffer that it will
42 * determines how long an AudioRecord can record before "over-running" data that has not
46 public class AudioRecord
52 * indicates AudioRecord state is not successfully initialized.
56 * indicates AudioRecord state is ready to be used
61 * indicates AudioRecord recording state is not recording
65 * indicates AudioRecord recording state is recording
95 // to keep in sync with frameworks/base/include/media/AudioRecord.h
105 private final static String TAG = "AudioRecord-Java";
112 * Accessed by native methods: provides access to C++ AudioRecord object
154 * Indicates the state of the AudioRecord instance.
158 * Indicates the recording state of the AudioRecord instance.
166 * The listener the AudioRecord notifies when the record position reaches a marker
181 * Looper associated with the thread that creates the AudioRecord instance
213 * required buffer size for the successful creation of an AudioRecord instance. Using values
217 public AudioRecord(int audioSource, int sampleRateInHz, int channelConfig, int audioFormat,
223 // remember which looper is associated with the AudioRecord instanciation
237 int initResult = native_setup( new WeakReference<AudioRecord>(this),
241 loge("Error code "+initResult+" when initializing native AudioRecord object.");
342 * Releases the native AudioRecord resources.
406 * Returns the state of the AudioRecord instance. This is useful after the
407 * AudioRecord instance has been created to check if it was initialized
410 * @see AudioRecord#STATE_INITIALIZED
411 * @see AudioRecord#STATE_UNINITIALIZED
418 * Returns the recording state of the AudioRecord instance.
419 * @see AudioRecord#RECORDSTATE_STOPPED
420 * @see AudioRecord#RECORDSTATE_RECORDING
441 * Returns the minimum buffer size required for the successful creation of an AudioRecord
444 * should be chosen according to the expected frequency at which the AudioRecord instance
457 * @see #AudioRecord(int, int, int, int, int) for more information on valid
475 return AudioRecord.ERROR_BAD_VALUE;
481 return AudioRecord.ERROR_BAD_VALUE;
486 return AudioRecord.ERROR_BAD_VALUE;
489 return AudioRecord.ERROR;
499 * @return the ID of the audio session this AudioRecord belongs to.
509 * Starts recording from the AudioRecord instance.
516 +"uninitialized AudioRecord."));
528 * Starts recording from the AudioRecord instance when the specified synchronization event
538 +"uninitialized AudioRecord."));
556 throw(new IllegalStateException("stop() called on an uninitialized AudioRecord."));
645 * Sets the listener the AudioRecord notifies when a previously set marker is reached or
654 * Sets the listener the AudioRecord notifies when a previously set marker is reached or
656 * Use this method to receive AudioRecord events in the Handler associated with another
671 // no given handler, use the looper the AudioRecord was created in
711 * Interface definition for a callback to be invoked when an AudioRecord has
712 * reached a notification marker set by {@link AudioRecord#setNotificationMarkerPosition(int)}
714 * {@link AudioRecord#setPositionNotificationPeriod(int)}.
721 void onMarkerReached(AudioRecord recorder);
727 void onPeriodicNotification(AudioRecord recorder);
742 private final AudioRecord mAudioRecord;
744 NativeEventHandler(AudioRecord recorder, Looper looper) {
768 Log.e(TAG, "[ android.media.AudioRecord.NativeEventHandler ] " +
783 AudioRecord recorder = (AudioRecord)((WeakReference)audiorecord_ref).get();
836 Log.d(TAG, "[ android.media.AudioRecord ] " + msg);
840 Log.e(TAG, "[ android.media.AudioRecord ] " + msg);