Home
last modified time | relevance | path

Searched refs:channelCount (Results 1 – 25 of 55) sorted by relevance

123

/frameworks/base/core/java/android/speech/tts/
DFileSynthesisCallback.java102 public int start(int sampleRateInHz, int audioFormat, int channelCount) { in start() argument
105 + "," + channelCount + ")"); in start()
114 mDispatcher.dispatchOnBeginSynthesis(sampleRateInHz, audioFormat, channelCount); in start()
133 mChannelCount = channelCount; in start()
204 int channelCount = 0; in done() local
229 channelCount = mChannelCount; in done()
237 makeWavHeader(sampleRateInHz, audioFormat, channelCount, dataLength)); in done()
284 private ByteBuffer makeWavHeader(int sampleRateInHz, int audioFormat, int channelCount, in makeWavHeader() argument
287 int byteRate = sampleRateInHz * sampleSizeInBytes * channelCount; in makeWavHeader()
288 short blockAlign = (short) (sampleSizeInBytes * channelCount); in makeWavHeader()
[all …]
DPlaybackSynthesisCallback.java125 public int start(int sampleRateInHz, int audioFormat, int channelCount) { in start() argument
126 if (DBG) Log.d(TAG, "start(" + sampleRateInHz + "," + audioFormat + "," + channelCount in start()
135 mDispatcher.dispatchOnBeginSynthesis(sampleRateInHz, audioFormat, channelCount); in start()
137 int channelConfig = BlockingAudioTrack.getChannelConfig(channelCount); in start()
141 Log.e(TAG, "Unsupported number of channels :" + channelCount); in start()
158 mAudioParams, sampleRateInHz, audioFormat, channelCount, in start()
DBlockingAudioTrack.java79 int audioFormat, int channelCount) { in BlockingAudioTrack() argument
83 mChannelCount = channelCount; in BlockingAudioTrack()
174 static int getChannelConfig(int channelCount) { in getChannelConfig() argument
175 if (channelCount == 1) { in getChannelConfig()
177 } else if (channelCount == 2){ in getChannelConfig()
DSynthesisPlaybackQueueItem.java67 int audioFormat, int channelCount, UtteranceProgressDispatcher dispatcher, in SynthesisPlaybackQueueItem() argument
77 mAudioTrack = new BlockingAudioTrack(audioParams, sampleRate, audioFormat, channelCount); in SynthesisPlaybackQueueItem()
DITextToSpeechCallback.aidl71 … void onBeginSynthesis(String utteranceId, int sampleRateInHz, int audioFormat, int channelCount); in onBeginSynthesis() argument
/frameworks/base/tests/Camera2Tests/SmartCamera/SimpleCamera/src/androidx/media/filterfw/decoder/
DAudioSample.java22 public final int channelCount; field in AudioSample
25 public AudioSample(int sampleRate, int channelCount, byte[] bytes) { in AudioSample() argument
27 this.channelCount = channelCount; in AudioSample()
/frameworks/wilhelm/src/android/
Dchannels.c30 SLuint32 sles_channel_out_mask_from_count(unsigned channelCount) in sles_channel_out_mask_from_count() argument
34 if (channelCount > FCC_8) { in sles_channel_out_mask_from_count()
37 switch (channelCount) { in sles_channel_out_mask_from_count()
69 SLuint32 sles_channel_in_mask_from_count(unsigned channelCount) { in sles_channel_in_mask_from_count() argument
70 switch (channelCount) { in sles_channel_in_mask_from_count()
76 if (channelCount > AUDIO_CHANNEL_COUNT_MAX) { in sles_channel_in_mask_from_count()
79 SLuint32 bitfield = (1 << channelCount) - 1; in sles_channel_in_mask_from_count()
DAacBqToPcmCbRenderer.cpp181 int32_t channelCount; in onPrepare() local
182 CHECK(meta->findInt32(kKeyChannelCount, &channelCount)); in onPrepare()
196 mPcmFormatValues[ANDROID_KEY_INDEX_PCMFORMAT_NUMCHANNELS] = channelCount; in onPrepare()
198 sles_channel_out_mask_from_count(channelCount); in onPrepare()
201 channelCount, sr); in onPrepare()
Dandroid_AudioSfDecoder.cpp270 int32_t channelCount; in onPrepare() local
271 bool hasChannelCount = meta->findInt32(kKeyChannelCount, &channelCount); in onPrepare()
326 CHECK(meta->findInt32(kKeyChannelCount, &channelCount)); in onPrepare()
350 mPcmFormatValues[ANDROID_KEY_INDEX_PCMFORMAT_NUMCHANNELS] = channelCount; in onPrepare()
352 sles_channel_out_mask_from_count(channelCount); in onPrepare()
760 int32_t channelCount; in hasNewDecodeParams() local
761 CHECK(meta->findInt32(kKeyChannelCount, &channelCount)); in hasNewDecodeParams()
771 sr, channelCount); in hasNewDecodeParams()
772 mPcmFormatValues[ANDROID_KEY_INDEX_PCMFORMAT_NUMCHANNELS] = channelCount; in hasNewDecodeParams()
775 sles_channel_out_mask_from_count(channelCount); in hasNewDecodeParams()
Dchannels.h58 extern SLuint32 sles_channel_out_mask_from_count(unsigned channelCount);
59 extern SLuint32 sles_channel_in_mask_from_count(unsigned channelCount);
Dandroid_GenericMediaPlayer.cpp549 int32_t channelCount; in afterMediaPlayerPreparedSuccessfully() local
553 channelCount = reply->readInt32(); in afterMediaPlayerPreparedSuccessfully()
556 channelCount = 2; in afterMediaPlayerPreparedSuccessfully()
558 if (UNKNOWN_NUMCHANNELS != channelCount) { in afterMediaPlayerPreparedSuccessfully()
560 notify(PLAYEREVENT_CHANNEL_COUNT, channelCount, true /*async*/); in afterMediaPlayerPreparedSuccessfully()
/frameworks/av/media/libstagefright/
DAudioSource.cpp54 uint32_t sampleRate, uint32_t channelCount, uint32_t outSampleRate, in AudioSource() argument
68 sampleRate, outSampleRate, channelCount); in AudioSource()
69 CHECK(channelCount == 1 || channelCount == 2); in AudioSource()
76 audio_channel_in_mask_from_count(channelCount)); in AudioSource()
80 uint32_t frameCount = kMaxBufferSize / sizeof(int16_t) / channelCount; in AudioSource()
90 audio_channel_in_mask_from_count(channelCount), in AudioSource()
195 meta->setInt32(kKeyChannelCount, mRecord->channelCount()); in getFormat()
208 const int32_t nChannels = mRecord->channelCount(); in rampVolume()
DAMRWriter.cpp79 int32_t channelCount; in addSource() local
81 CHECK(meta->findInt32(kKeyChannelCount, &channelCount)); in addSource()
82 CHECK_EQ(channelCount, 1); in addSource()
/frameworks/av/media/libnbaio/
DNBAIO.cpp48 NBAIO_Format Format_from_SR_C(unsigned sampleRate, unsigned channelCount, in Format_from_SR_C() argument
51 if (sampleRate == 0 || channelCount == 0 || !audio_is_valid_format(format)) { in Format_from_SR_C()
56 ret.mChannelCount = channelCount; in Format_from_SR_C()
59 channelCount * audio_bytes_per_sample(format) : sizeof(uint8_t); in Format_from_SR_C()
/frameworks/av/services/audioflinger/
DBufferProviders.cpp304 ReformatBufferProvider::ReformatBufferProvider(int32_t channelCount, in ReformatBufferProvider() argument
308 channelCount * audio_bytes_per_sample(inputFormat), in ReformatBufferProvider()
309 channelCount * audio_bytes_per_sample(outputFormat), in ReformatBufferProvider()
311 mChannelCount(channelCount), in ReformatBufferProvider()
316 this, channelCount, inputFormat, outputFormat); in ReformatBufferProvider()
324 TimestretchBufferProvider::TimestretchBufferProvider(int32_t channelCount, in TimestretchBufferProvider() argument
326 mChannelCount(channelCount), in TimestretchBufferProvider()
329 mFrameSize(channelCount * audio_bytes_per_sample(format)), in TimestretchBufferProvider()
342 this, channelCount, format, sampleRate, playbackRate.mSpeed, in TimestretchBufferProvider()
DAudioFlinger.h352 uint32_t channelCount = FCC_2; // stereo is default in isValidPcmSinkChannelMask() local
354 channelCount = audio_channel_count_from_out_mask(channelMask); in isValidPcmSinkChannelMask()
355 if (channelCount < FCC_2 // mono is not supported at this time in isValidPcmSinkChannelMask()
356 || channelCount > AudioMixer::MAX_NUM_CHANNELS) { in isValidPcmSinkChannelMask()
361 return channelMask == audio_channel_out_mask_from_count(channelCount); in isValidPcmSinkChannelMask()
365 const uint32_t channelCount = audio_channel_count_from_out_mask(channelMask); in isValidPcmSinkChannelMask() local
366 if (channelCount >= FCC_2 // mono is not supported at this time in isValidPcmSinkChannelMask()
367 && channelCount <= AudioMixer::MAX_NUM_CHANNELS) { in isValidPcmSinkChannelMask()
DFastCapture.cpp108 unsigned channelCount = Format_channelCount(mFormat); in onStateChange() local
109 ALOG_ASSERT(channelCount >= 1 && channelCount <= FCC_8); in onStateChange()
DBufferProviders.h139 ReformatBufferProvider(int32_t channelCount,
153 TimestretchBufferProvider(int32_t channelCount,
DAudioMixer.h195 uint8_t channelCount; // 1 or 2, redundant with (needs & NEEDS_CHANNEL_COUNT__MASK) member
382 static process_hook_t getProcessHook(int processType, uint32_t channelCount,
384 static hook_t getTrackHook(int trackType, uint32_t channelCount,
/frameworks/wilhelm/tests/examples/
DslesTestRecBuffQueue.cpp43 int channelCount = 1; variable
169 info.channels = channelCount; in TestRecToBuffQueue()
268 pcm.numChannels = channelCount; in TestRecToBuffQueue()
295 pcm.channelMask = (1 << channelCount) - 1; in TestRecToBuffQueue()
297 switch (channelCount) { in TestRecToBuffQueue()
305 fprintf(stderr, "Unsupported channel count %d\n", channelCount); in TestRecToBuffQueue()
504 channelCount = atoi(&arg[2]); in main()
553 frameSize = audio_bytes_per_sample(transferFormat) * channelCount; in main()
/frameworks/base/media/java/android/media/
DAudioFormat.java682 int channelCount = channelCountFromOutChannelMask(getChannelMask()); in getChannelCount() local
683 if (channelCount == 0) { in getChannelCount()
684 channelCount = channelIndexCount; in getChannelCount()
685 } else if (channelCount != channelIndexCount && channelIndexCount != 0) { in getChannelCount()
686 channelCount = 0; // position and index channel count mismatch in getChannelCount()
688 return channelCount; in getChannelCount()
DAudioTrack.java903 final int channelCount = AudioFormat.channelCountFromOutChannelMask(channelConfig); in isMultichannelConfigSupported() local
904 if (channelCount > CHANNEL_COUNT_MAX) { in isMultichannelConfigSupported()
906 channelCount + ">" + CHANNEL_COUNT_MAX); in isMultichannelConfigSupported()
1299 int channelCount = 0; in getMinBufferSize() local
1303 channelCount = 1; in getMinBufferSize()
1307 channelCount = 2; in getMinBufferSize()
1314 channelCount = AudioFormat.channelCountFromOutChannelMask(channelConfig); in getMinBufferSize()
1331 int size = native_get_min_buff_size(sampleRateInHz, channelCount, audioFormat); in getMinBufferSize()
/frameworks/av/services/audiopolicy/common/managerdefinitions/src/
DAudioPort.cpp195 uint32_t channelCount = UINT_MAX; in pickChannelMask() local
203 if ((cnlCount < channelCount) && (cnlCount > 0)) { in pickChannelMask()
205 channelCount = cnlCount; in pickChannelMask()
209 uint32_t channelCount = 0; in pickChannelMask() local
224 if ((cnlCount > channelCount) && (cnlCount <= maxCount)) { in pickChannelMask()
226 channelCount = cnlCount; in pickChannelMask()
/frameworks/av/media/libeffects/testlibs/
DEffectEqualizer.cpp239 int channelCount; in Equalizer_setConfig() local
241 channelCount = 1; in Equalizer_setConfig()
243 channelCount = 2; in Equalizer_setConfig()
245 CHECK_ARG(channelCount <= AudioBiquadFilter::MAX_CHANNELS); in Equalizer_setConfig()
249 pContext->pEqualizer->configure(channelCount, in Equalizer_setConfig()
252 pContext->adapter.configure(*pContext->pEqualizer, channelCount, in Equalizer_setConfig()
/frameworks/base/core/jni/
Dandroid_media_AudioRecord.cpp245 uint32_t channelCount = audio_channel_count_from_in_mask(localChanMask); in android_media_AudioRecord_setup() local
260 size_t frameSize = channelCount * bytesPerSample; in android_media_AudioRecord_setup()
644 jint sampleRateInHertz, jint channelCount, jint audioFormat) { in android_media_AudioRecord_get_min_buff_size() argument
647 sampleRateInHertz, channelCount, audioFormat); in android_media_AudioRecord_get_min_buff_size()
654 audio_channel_in_mask_from_count(channelCount)); in android_media_AudioRecord_get_min_buff_size()
662 return frameCount * channelCount * audio_bytes_per_sample(format); in android_media_AudioRecord_get_min_buff_size()

123