/frameworks/base/media/java/android/media/ |
AudioRecordRoutingProxy.java | 20 * An AudioRecord connected to a native (C/C++) which allows access only to routing methods. 22 class AudioRecordRoutingProxy extends AudioRecord { 24 * A constructor which explicitly connects a Native (C++) AudioRecord. For use by 26 * @param nativeRecordInJavaObj A C/C++ pointer to a native AudioRecord
|
AudioRecord.java | 43 * The AudioRecord class manages the audio resources for Java applications 45 * achieved by "pulling" (reading) the data from the AudioRecord object. The 46 * application is responsible for polling the AudioRecord object in time using one of 49 * on the audio data storage format that is the most convenient for the user of AudioRecord. 50 * <p>Upon creation, an AudioRecord object initializes its associated audio buffer that it will 52 * determines how long an AudioRecord can record before "over-running" data that has not 56 public class AudioRecord implements AudioRouting 64 * indicates AudioRecord state is not successfully initialized. 68 * indicates AudioRecord state is ready to be used 73 * indicates AudioRecord recording state is not recordin [all...] |
/packages/apps/SpeechRecorder/src/com/android/speechrecorder/ |
MicrophoneInputStream.java | 22 import android.media.AudioRecord; 29 * Provides an InputStream like API over {@code android.media.AudioRecord}. 37 private final AudioRecord mAudioRecord; 43 mBufferSize = AudioRecord.getMinBufferSize(sampleRate, 49 private AudioRecord createAudioRecord() throws IOException { 50 AudioRecord ar = new AudioRecord(VOICE_RECOGNITION, 53 if (ar.getState() != AudioRecord.STATE_INITIALIZED) { 55 throw new IOException("Unable to create AudioRecord"); 69 if (recordingState != AudioRecord.RECORDSTATE_RECORDING) [all...] |
/cts/tests/tests/permission2/src/android/permission2/cts/ |
NoCaptureAudioOutputPermissionTest.java | 21 import android.media.AudioRecord; 31 * Verify that the AudioRecord constructor fails to create a recording object 41 int bufferSize = AudioRecord.getMinBufferSize(44100, 48 // use this buffer size to test AudioRecord creation. 55 // The attempt to create the AudioRecord object succeeds even if the 59 AudioRecord record = new AudioRecord(AudioSource.REMOTE_SUBMIX, 44100, 62 assertTrue("AudioRecord state should not be INITIALIZED because the application" 64 record.getState() != AudioRecord.STATE_INITIALIZED);
|
/cts/tests/tests/media/src/android/media/cts/ |
AudioRecord_BufferSizeTest.java | 22 import android.media.AudioRecord; 43 private AudioRecord mAudioRecord; 68 int bufferSize = AudioRecord.getMinBufferSize(sampleRateInHz, CHANNEL_CONFIG, AUDIO_FORMAT); 73 assertEquals(AudioRecord.RECORDSTATE_STOPPED, mAudioRecord.getRecordingState()); 76 assertEquals(AudioRecord.RECORDSTATE_RECORDING, mAudioRecord.getRecordingState()); 85 assertEquals(AudioRecord.RECORDSTATE_STOPPED, mAudioRecord.getRecordingState()); 92 mAudioRecord = new AudioRecord(AudioSource.DEFAULT, sampleRateInHz,
|
AudioPreProcessingTest.java | 23 import android.media.AudioRecord; 34 // AudioRecord sampling rate 55 AudioRecord ar = getAudioRecord(); 56 assertNotNull("could not create AudioRecord", ar); 83 AudioRecord ar = getAudioRecord(); 84 assertNotNull("could not create AudioRecord", ar); 116 AudioRecord ar = getAudioRecord(); 117 assertNotNull("could not create AudioRecord", ar); 144 AudioRecord ar = getAudioRecord(); 145 assertNotNull("could not create AudioRecord", ar) [all...] |
RoutingTest.java | 25 import android.media.AudioRecord; 40 * AudioTrack / AudioRecord preferred device and routing listener tests. 44 * - the deprecated AudioTrack.OnRoutingChangedListener and AudioRecord.OnRoutingChangedListener 200 private AudioRecord allocAudioRecord() { 202 AudioRecord.getMinBufferSize( 206 AudioRecord audioRecord = 207 new AudioRecord( 212 return audioRecord; 215 private class AudioRecordRoutingListener implements AudioRecord.OnRoutingChangedListener [all...] |
AudioRecordTest.java | 25 import android.media.AudioRecord; 26 import android.media.AudioRecord.OnRecordPositionUpdateListener; 47 private AudioRecord mAudioRecord; 85 mAudioRecord = new AudioRecord(MediaRecorder.AudioSource.DEFAULT, mHz, 88 AudioRecord.getMinBufferSize(mHz, 127 assertEquals(AudioRecord.STATE_INITIALIZED, mAudioRecord.getState()); 129 assertEquals(AudioRecord.RECORDSTATE_STOPPED, mAudioRecord.getRecordingState()); 131 int bufferSize = AudioRecord.getMinBufferSize(mHz, 142 assertEquals(AudioRecord.STATE_INITIALIZED, mAudioRecord.getState()); 145 assertEquals(AudioRecord.SUCCESS [all...] |
AudioRecordingConfigurationTest.java | 24 import android.media.AudioRecord; 43 private AudioRecord mAudioRecord; 66 mAudioRecord = new AudioRecord.Builder() 108 assertEquals(AudioRecord.STATE_INITIALIZED, mAudioRecord.getState()); 110 assertEquals(AudioRecord.RECORDSTATE_RECORDING, mAudioRecord.getRecordingState()); 144 assertEquals(AudioRecord.STATE_INITIALIZED, mAudioRecord.getState()); 146 assertEquals(AudioRecord.RECORDSTATE_RECORDING, mAudioRecord.getRecordingState()); 179 assertEquals(AudioRecord.STATE_INITIALIZED, mAudioRecord.getState()); 181 assertEquals(AudioRecord.RECORDSTATE_RECORDING, mAudioRecord.getRecordingState()); 243 // test the client format matches that requested (same as the AudioRecord's [all...] |
/cts/apps/CtsVerifier/src/com/android/cts/verifier/audio/ |
TrivialRecorder.java | 21 import android.media.AudioRecord; 29 AudioRecord mAudioRecord; 41 AudioRecord.getMinBufferSize( 46 new AudioRecord( 60 public AudioRecord getAudioRecord() { return mAudioRecord; }
|
AudioRecordHelper.java | 5 import android.media.AudioRecord; 14 * A wrapper on AudioRecord class. 31 private AudioRecord audioRecord; 41 tmpBufferSize = AudioRecord.getMinBufferSize(rate, CHANNEL, ENCODING); 42 AudioRecord testAudioRecord = new AudioRecord(source, rate, CHANNEL, ENCODING, 44 if (testAudioRecord.getState() == AudioRecord.STATE_INITIALIZED) { 76 audioRecord = new AudioRecord(source, sampleRate, CHANNEL, ENCODING, bufferSize) [all...] |
AudioInputRoutingNotificationsActivity.java | 26 import android.media.AudioRecord; 40 * Tests AudioRecord (re)Routing messages. 71 private class AudioRecordRoutingChangeListener implements AudioRecord.OnRoutingChangedListener { 72 public void onRoutingChanged(AudioRecord audioRecord) { 78 AudioDeviceInfo routedDevice = audioRecord.getRoutedDevice(); 105 AudioRecord audioRecord = mAudioRecorder.getAudioRecord(); 106 audioRecord.addOnRoutingChangedListener(
|
AudioFrequencyLineActivity.java | 33 import android.media.AudioRecord; 52 AudioRecord.OnRecordPositionUpdateListener { 75 private AudioRecord mRecorder; 541 if (mRecorder.getRecordingState() != AudioRecord.RECORDSTATE_RECORDING) { 579 int minRecordBuffSizeInBytes = AudioRecord.getMinBufferSize(mSamplingRate, 596 mRecorder = new AudioRecord(mSelectedRecordSource, mSamplingRate, 602 if (mRecorder.getState() != AudioRecord.STATE_INITIALIZED) { 614 // Implementation of AudioRecord.OnPeriodicNotificationListener 616 public void onPeriodicNotification(AudioRecord recorder) { 676 public void onMarkerReached(AudioRecord track) [all...] |
/external/libgdx/backends/gdx-backend-android/src/com/badlogic/gdx/backends/android/ |
AndroidAudioRecorder.java | 20 import android.media.AudioRecord;
26 /** {@link AudioRecorder} implementation for the android system based on AudioRecord
30 private AudioRecord recorder;
34 int minBufferSize = AudioRecord.getMinBufferSize(samplingRate, channelConfig, AudioFormat.ENCODING_PCM_16BIT);
35 recorder = new AudioRecord(MediaRecorder.AudioSource.MIC, samplingRate, channelConfig, AudioFormat.ENCODING_PCM_16BIT,
37 if (recorder.getState() != AudioRecord.STATE_INITIALIZED)
|
/frameworks/av/include/media/ |
AudioRecord.h | 36 class AudioRecord : public RefBase 40 /* Events used by AudioRecord callback function (callback_t). 41 * Keep in sync with frameworks/base/media/java/android/media/AudioRecord.java NATIVE_EVENT_*. 93 * event: type of event notified (see enum AudioRecord::event_type). 96 * - EVENT_MORE_DATA: pointer to AudioRecord::Buffer struct. The callback must not read 108 * an AudioRecord object. 123 /* How data is transferred from AudioRecord 132 /* Constructs an uninitialized AudioRecord. No connection with 139 AudioRecord(const String16& opPackageName); 141 /* Creates an AudioRecord object and registers it with AudioFlinger [all...] |
IAudioRecord.h | 36 DECLARE_META_INTERFACE(AudioRecord);
|
/frameworks/av/include/media/stagefright/ |
AudioSource.h | 21 #include <media/AudioRecord.h> 31 class AudioRecord; 57 status_t dataCallback(const AudioRecord::Buffer& buffer); 80 sp<AudioRecord> mRecord;
|
/frameworks/av/media/libmedia/ |
AudioRecord.cpp | 19 #define LOG_TAG "AudioRecord" 25 #include <media/AudioRecord.h> 36 status_t AudioRecord::getMinFrameCount( 68 AudioRecord::AudioRecord(const String16 &opPackageName) 75 AudioRecord::AudioRecord( 105 AudioRecord::~AudioRecord() 114 mAudioRecordThread->requestExit(); // see comment in AudioRecord. [all...] |
IAudioRecord.cpp | 69 IMPLEMENT_META_INTERFACE(AudioRecord, "android.media.IAudioRecord");
|
/external/webrtc/webrtc/modules/audio_device/android/java/src/org/webrtc/voiceengine/ |
WebRtcAudioRecord.java | 19 import android.media.AudioRecord; 54 private AudioRecord audioRecord = null; 74 assertTrue(audioRecord.getRecordingState() 75 == AudioRecord.RECORDSTATE_RECORDING); 79 int bytesRead = audioRecord.read(byteBuffer, byteBuffer.capacity()); 83 Logging.e(TAG,"AudioRecord.read failed: " + bytesRead); 84 if (bytesRead == AudioRecord.ERROR_INVALID_OPERATION) { 98 audioRecord.stop(); 100 Logging.e(TAG,"AudioRecord.stop failed: " + e.getMessage()) [all...] |
/frameworks/base/core/jni/ |
android_media_AudioRecord.cpp | 19 #define LOG_TAG "AudioRecord-JNI" 27 #include <media/AudioRecord.h> 40 static const char* const kClassPathName = "android/media/AudioRecord"; 46 jfieldID nativeRecorderInJavaObj; // provides access to the C++ AudioRecord object 47 jfieldID nativeCallbackCookie; // provides access to the AudioRecord callback data 93 case AudioRecord::EVENT_MARKER: { 107 case AudioRecord::EVENT_NEW_POS: { 157 static sp<AudioRecord> getAudioRecord(JNIEnv* env, jobject thiz) 160 AudioRecord* const ar = 161 (AudioRecord*)env->GetLongField(thiz, javaAudioRecordFields.nativeRecorderInJavaObj) [all...] |
/frameworks/av/media/libstagefright/ |
AudioSource.cpp | 24 #include <media/AudioRecord.h> 38 case AudioRecord::EVENT_MORE_DATA: { 39 source->dataCallback(*((AudioRecord::Buffer *) info)); 42 case AudioRecord::EVENT_OVERRUN: { 43 ALOGW("AudioRecord reported overrun!"); 73 status_t status = AudioRecord::getMinFrameCount(&minFrameCount, 78 // make sure that the AudioRecord callback never returns more than the maximum 82 // make sure that the AudioRecord total buffer size is large enough 88 mRecord = new AudioRecord( 97 AudioRecord::TRANSFER_DEFAULT [all...] |
/developers/build/prebuilts/gradle/WearSpeakerSample/wear/src/main/java/com/example/android/wearable/speaker/ |
SoundRecorder.java | 22 import android.media.AudioRecord; 47 private static int BUFFER_SIZE = AudioRecord 84 private AudioRecord mAudioRecord; 93 mAudioRecord = new AudioRecord(MediaRecorder.AudioSource.MIC, 256 * Cleans up some resources related to {@link AudioTrack} and {@link AudioRecord}
|
/developers/samples/android/wearable/wear/WearSpeakerSample/wear/src/main/java/com/example/android/wearable/speaker/ |
SoundRecorder.java | 22 import android.media.AudioRecord; 47 private static int BUFFER_SIZE = AudioRecord 84 private AudioRecord mAudioRecord; 93 mAudioRecord = new AudioRecord(MediaRecorder.AudioSource.MIC, 256 * Cleans up some resources related to {@link AudioTrack} and {@link AudioRecord}
|
/development/samples/browseable/WearSpeakerSample/src/com.example.android.wearable.speaker/ |
SoundRecorder.java | 22 import android.media.AudioRecord; 47 private static int BUFFER_SIZE = AudioRecord 84 private AudioRecord mAudioRecord; 93 mAudioRecord = new AudioRecord(MediaRecorder.AudioSource.MIC, 256 * Cleans up some resources related to {@link AudioTrack} and {@link AudioRecord}
|