Home
last modified time | relevance | path

Searched refs:AudioTrack (Results 1 – 25 of 83) sorted by relevance

1234

/frameworks/base/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/functional/audio/
DMediaAudioTrackTest.java21 import android.media.AudioTrack;
85 AudioTrack track = null; in constructorTestMultiSampleRate()
87 track = new AudioTrack( in constructorTestMultiSampleRate()
92 AudioTrack.getMinBufferSize(testSampleRates[i], in constructorTestMultiSampleRate()
117 +", bufferSizeInBytes=" + AudioTrack.getMinBufferSize(testSampleRates[i], in constructorTestMultiSampleRate()
140 AudioManager.STREAM_MUSIC, AudioTrack.MODE_STREAM, in testConstructorMono16MusicStream()
142 AudioTrack.STATE_INITIALIZED); in testConstructorMono16MusicStream()
153 AudioManager.STREAM_MUSIC, AudioTrack.MODE_STREAM, in testConstructorStereo16MusicStream()
155 AudioTrack.STATE_INITIALIZED); in testConstructorStereo16MusicStream()
166 AudioManager.STREAM_MUSIC, AudioTrack.MODE_STATIC, in testConstructorMono16MusicStatic()
[all …]
/frameworks/base/core/java/android/speech/tts/
DBlockingAudioTrack.java6 import android.media.AudioTrack;
73 private AudioTrack mAudioTrack;
95 AudioTrack track = createStreamingAudioTrack(); in init()
117 AudioTrack track = null; in write()
132 AudioTrack track = null; in waitAndRelease()
191 private static int writeToAudioTrack(AudioTrack audioTrack, byte[] bytes) { in writeToAudioTrack()
192 if (audioTrack.getPlayState() != AudioTrack.PLAYSTATE_PLAYING) { in writeToAudioTrack()
215 private AudioTrack createStreamingAudioTrack() { in createStreamingAudioTrack()
219 = AudioTrack.getMinBufferSize(mSampleRateInHz, channelConfig, mAudioFormat); in createStreamingAudioTrack()
226 AudioTrack audioTrack = new AudioTrack(mAudioParams.mAudioAttributes, in createStreamingAudioTrack()
[all …]
DSynthesisPlaybackQueueItem.java18 import android.media.AudioTrack;
35 implements AudioTrack.OnPlaybackPositionUpdateListener {
244 public void onMarkerReached(AudioTrack track) { in onMarkerReached()
258 public void onPeriodicNotification(AudioTrack track) {} in onPeriodicNotification()
/frameworks/base/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/unit/
DAudioTrackUnitTest.java36 import android.media.AudioTrack;
54 private static final int TEST_BUFFER_SIZE = AudioTrack.getMinBufferSize(
64 AudioTrack audioTrack = new AudioTrack.Builder().setContext( in testBuilderConstructionWithContext_defaultDeviceExplicitSessionId()
69 assertEquals(AudioTrack.STATE_INITIALIZED, audioTrack.getState()); in testBuilderConstructionWithContext_defaultDeviceExplicitSessionId()
81 AudioTrack audioTrack = new AudioTrack.Builder().setContext( in testBuilderConstructionWithContext_virtualDeviceDefaultAudioPolicy()
85 assertEquals(AudioTrack.STATE_INITIALIZED, audioTrack.getState()); in testBuilderConstructionWithContext_virtualDeviceDefaultAudioPolicy()
97 AudioTrack audioTrack = new AudioTrack.Builder().setContext( in testBuilderConstructionWithContext_virtualDeviceCustomAudioPolicy()
101 assertEquals(AudioTrack.STATE_INITIALIZED, audioTrack.getState()); in testBuilderConstructionWithContext_virtualDeviceCustomAudioPolicy()
115 AudioTrack audioTrack = new AudioTrack.Builder().setContext( in testBuilderConstructionWithContext_virtualDeviceSetSessionIdOverridesContext()
121 assertEquals(AudioTrack.STATE_INITIALIZED, audioTrack.getState()); in testBuilderConstructionWithContext_virtualDeviceSetSessionIdOverridesContext()
/frameworks/base/core/java/android/companion/virtual/audio/
DAudioInjection.java19 import static android.media.AudioTrack.PLAYSTATE_PLAYING;
20 import static android.media.AudioTrack.PLAYSTATE_STOPPED;
21 import static android.media.AudioTrack.STATE_INITIALIZED;
22 import static android.media.AudioTrack.WRITE_BLOCKING;
29 import android.media.AudioTrack;
53 private AudioTrack mAudioTrack;
75 void setAudioTrack(@Nullable AudioTrack audioTrack) { in setAudioTrack()
127 @AudioTrack.WriteMode int writeMode) { in write()
154 @AudioTrack.WriteMode int writeMode, long timestamp) { in write()
168 @AudioTrack.WriteMode int writeMode) { in write()
[all …]
/frameworks/base/core/jni/
Dandroid_media_AudioTrack.cpp66 class AudioTrackCallbackImpl : public AudioTrack::IAudioTrackCallback {
100 size_t onCanWriteMoreData(const AudioTrack::Buffer& buffer) override { in onCanWriteMoreData()
231 sp<AudioTrack> getAudioTrack(JNIEnv* env, jobject thiz) { in getAudioTrack()
232 return getFieldSp<AudioTrack>(env, thiz, javaAudioTrackFields.nativeTrackInJavaObj); in getAudioTrack()
238 sp<AudioTrack> android_media_AudioTrack_getAudioTrack(JNIEnv* env, jobject audioTrackObj) { in android_media_AudioTrack_getAudioTrack()
280 sp<AudioTrack> lpTrack; in android_media_AudioTrack_setup()
329 lpTrack = sp<AudioTrack>::make(attributionSource); in android_media_AudioTrack_setup()
381 offload ? AudioTrack::TRANSFER_SYNC_NOTIF_CALLBACK in android_media_AudioTrack_setup()
382 : AudioTrack::TRANSFER_SYNC, in android_media_AudioTrack_setup()
408 AudioTrack::TRANSFER_SHARED, in android_media_AudioTrack_setup()
[all …]
/frameworks/av/media/libaudioclient/
DAudioTrack.cpp116 status_t AudioTrack::getMinFrameCount( in getMinFrameCount()
172 bool AudioTrack::isDirectOutputSupported(const audio_config_base_t& config, in isDirectOutputSupported()
193 void AudioTrack::MediaMetrics::gather(const AudioTrack *track) in gather()
225 status_t AudioTrack::getMetrics(mediametrics::Item * &item) in getMetrics()
236 AudioTrack::AudioTrack(const AttributionSourceState& attributionSource) in AudioTrack() function in android::AudioTrack
241 AudioTrack::AudioTrack( in AudioTrack() function in android::AudioTrack
267 class LegacyCallbackWrapper : public AudioTrack::IAudioTrackCallback {
268 const AudioTrack::legacy_callback_t mCallback;
271 LegacyCallbackWrapper(AudioTrack::legacy_callback_t callback, void* user) in LegacyCallbackWrapper()
273 size_t onMoreData(const AudioTrack::Buffer & buffer) override { in onMoreData()
[all …]
/frameworks/av/media/libaudioclient/tests/
Dtest_create_audiotrack.cpp42 sp<AudioTrack> track = new AudioTrack(AUDIO_STREAM_DEFAULT, 0 /* sampleRate */, in testTrack()
108 sp<AudioTrack> track = new AudioTrack(); in testTrack()
109 const auto emptyCallback = sp<AudioTrack::IAudioTrackCallback>::make(); in testTrack()
113 ((fast && sharedBuffer == 0) || offload) ? AudioTrack::TRANSFER_CALLBACK in testTrack()
114 : AudioTrack::TRANSFER_DEFAULT, in testTrack()
Dtrack_test_output_v1.0_ref_walleye.txt3 AudioTrack::dump
14 AudioTrack::dump
25 AudioTrack::dump
36 AudioTrack::dump
47 AudioTrack::dump
58 AudioTrack::dump
69 AudioTrack::dump
80 AudioTrack::dump
91 AudioTrack::dump
102 AudioTrack::dump
[all …]
Daudio_test_utils.h76 class AudioPlayback : public AudioTrack::IAudioTrackCallback {
81 AudioTrack::transfer_type transferType = AudioTrack::TRANSFER_SHARED,
87 sp<AudioTrack> getAudioTrackHandle();
113 const AudioTrack::transfer_type mTransferType;
123 sp<AudioTrack> mTrack;
Daudiotrack_tests.cpp37 const auto at = sp<AudioTrack>::make(attributionSource); in TEST()
49 AUDIO_SESSION_NONE, AudioTrack::TRANSFER_OBTAIN); in TEST()
88 if (!AudioTrack::isDirectOutputSupported(config, attributes) && in TEST()
96 AudioTrack::TRANSFER_OBTAIN, nullptr, &info); in TEST()
100 AudioTrack::TRANSFER_OBTAIN); in TEST()
146 AUDIO_SESSION_NONE, AudioTrack::TRANSFER_SHARED); in TEST()
Dtrackplayerbase_tests.cpp28 class TrackPlayer : public TrackPlayerBase, public AudioTrack::IAudioTrackCallback {
49 sp<AudioTrack> track = new AudioTrack(mStreamType, mSampleRate, mFormat, channelMask, in SetUp()
57 sp<AudioTrack> playerTrack = mPlayer->mAudioTrack; in SetUp()
Daudio_test_utils.cpp52 audio_session_t sessionId, AudioTrack::transfer_type transferType, in AudioPlayback()
82 if (mTransferType == AudioTrack::TRANSFER_OBTAIN) { in create()
83 mTrack = new AudioTrack(attributionSource); in create()
88 } else if (mTransferType == AudioTrack::TRANSFER_SHARED) { in create()
89 mTrack = new AudioTrack(AUDIO_STREAM_MUSIC, mSampleRate, mFormat, mChannelMask, mMemory, in create()
90 mFlags, wp<AudioTrack::IAudioTrackCallback>::fromExisting(this), 0, in create()
94 AudioTrack::convertTransferToText(mTransferType)); in create()
131 sp<AudioTrack> AudioPlayback::getAudioTrackHandle() { in getAudioTrackHandle()
163 AudioTrack::Buffer trackBuffer; in fillBuffer()
222 if (mTransferType == AudioTrack::TRANSFER_SHARED) in onProcess()
[all …]
/frameworks/av/media/libaudioclient/include/media/
DTrackPlayerBase.h31 void init(const sp<AudioTrack>& pat, const sp<AudioTrack::IAudioTrackCallback>& callback,
41 sp<AudioTrack> mAudioTrack;
69 sp<AudioTrack::IAudioTrackCallback> mCallbackHandle;
DAudioTrack.h51 class AudioTrack : public AudioSystem::AudioDeviceCallback
99 friend AudioTrack; variable
153 friend AudioTrack; variable
168 virtual size_t onMoreData([[maybe_unused]] const AudioTrack::Buffer& buffer) { return 0; } in onMoreData()
220 virtual size_t onCanWriteMoreData([[maybe_unused]] const AudioTrack::Buffer& buffer) { in onCanWriteMoreData()
260 explicit AudioTrack(const AttributionSourceState& attributionSourceState = {});
326 AudioTrack( audio_stream_type_t streamType,
355 AudioTrack( audio_stream_type_t streamType,
376 virtual ~AudioTrack();
1164 AudioTrack(const AudioTrack& other);
[all …]
/frameworks/av/media/libmedia/docs/
Dpaused.dot13 ATstop [label="AudioTrack::stop()"];
16 ATpause [label="AudioTrack::pause()"];
19 ATstart [label="AudioTrack::start()"];
20 destructor [label="~AudioTrack()"];
25 ATsetMarkerPosition [label="AudioTrack::setMarkerPosition()\n[sets marker variables]"];
28 ATsetPositionUpdatePeriod [label="AudioTrack::setPositionUpdatePeriod()\n[sets update period variab…
/frameworks/wilhelm/src/android/
DAudioTrackCallback.h31 const android::AudioTrack::Buffer& buffer);
34 class AudioTrackCallback : public AudioTrack::IAudioTrackCallback {
38 size_t onMoreData(const AudioTrack::Buffer& buffer) override { in onMoreData()
88 size_t onCanWriteMoreData([[maybe_unused]] const AudioTrack::Buffer& buffer) { in onCanWriteMoreData()
/frameworks/base/media/java/android/media/
DAudioDevicePort.java72 @AudioTrack.EncapsulationMetadataType int[] encapsulationMetadataTypes) { in AudioDevicePort()
85 @AudioTrack.EncapsulationMetadataType int[] encapsulationMetadataTypes, in AudioDevicePort()
125 public @NonNull @AudioTrack.EncapsulationMode int[] encapsulationModes() { in encapsulationModes()
130 .filter(mode -> mode != AudioTrack.ENCAPSULATION_MODE_HANDLE) in encapsulationModes()
137 public @NonNull @AudioTrack.EncapsulationMetadataType int[] encapsulationMetadataTypes() { in encapsulationMetadataTypes()
DMediaSync.java22 import android.media.AudioTrack;
200 private AudioTrack mAudioTrack = null;
333 public void setAudioTrack(@Nullable AudioTrack audioTrack) { in setAudioTrack()
341 private native final void native_setAudioTrack(@Nullable AudioTrack audioTrack); in native_setAudioTrack()
539 if (size > 0 && mAudioTrack.getPlayState() != AudioTrack.PLAYSTATE_PLAYING) { in postRenderAudio()
549 AudioTrack.WRITE_NON_BLOCKING); in postRenderAudio()
DAudioTrack.java97 public class AudioTrack extends PlayerBase class
693 public AudioTrack(int streamType, int sampleRateInHz, int channelConfig, int audioFormat, in AudioTrack() method in AudioTrack
751 public AudioTrack(int streamType, int sampleRateInHz, int channelConfig, int audioFormat, in AudioTrack() method in AudioTrack
798 public AudioTrack(AudioAttributes attributes, AudioFormat format, int bufferSizeInBytes, in AudioTrack() method in AudioTrack
805 private AudioTrack(@Nullable Context context, AudioAttributes attributes, AudioFormat format, in AudioTrack() method in AudioTrack
876 int initResult = native_setup(new WeakReference<AudioTrack>(this), mAttributes, in AudioTrack()
923 /*package*/ AudioTrack(long nativeTrackInJavaObj) { in AudioTrack() method in AudioTrack
958 int initResult = native_setup(new WeakReference<AudioTrack>(this), in deferred_connect()
1342 private @NonNull AudioTrack buildCallInjectionTrack() { in buildCallInjectionTrack()
1361 AudioTrack track = audioPolicy.createAudioTrackSource(audioMix); in buildCallInjectionTrack()
[all …]
/frameworks/base/media/tests/AudioPolicyTest/src/com/android/audiopolicytest/
DAudioPolicyDeathTest.java34 import android.media.AudioTrack;
150 AudioTrack track = null; in testPolicyClientDeathSendBecomingNoisyIntent()
172 private AudioTrack createAudioTrack() { in createAudioTrack()
183 AudioTrack track = new AudioTrack(attributes, format, data.length, in createAudioTrack()
184 AudioTrack.MODE_STATIC, AudioManager.AUDIO_SESSION_ID_GENERATE); in createAudioTrack()
/frameworks/av/cmds/stagefright/
DAudioPlayer.h32 class AudioPlayer : AudioTrack::IAudioTrackCallback {
70 size_t onMoreData(const AudioTrack::Buffer& buffer) override;
73 sp<AudioTrack> mAudioTrack;
/frameworks/base/media/jni/soundpool/
DStream.h133 class StreamCallback : public AudioTrack::IAudioTrackCallback {
136 size_t onMoreData(const AudioTrack::Buffer& buffer) override;
144 size_t onCanWriteMoreData(const AudioTrack::Buffer& buffer) override;
185 sp<AudioTrack> mAudioTrack GUARDED_BY(mLock);
/frameworks/base/media/jni/
Dandroid_media_MediaSync.h28 class AudioTrack; variable
37 status_t setAudioTrack(const sp<AudioTrack> &audioTrack);
/frameworks/av/media/libstagefright/include/media/stagefright/
DMediaSync.h33 class AudioTrack; variable
83 status_t setAudioTrack(const sp<AudioTrack> &audioTrack);
202 sp<AudioTrack> mAudioTrack;

1234