Loading include/media/AudioTrack.h +4 −2 Original line number Original line Diff line number Diff line Loading @@ -135,8 +135,10 @@ public: * format: Audio format (e.g AUDIO_FORMAT_PCM_16_BIT for signed * format: Audio format (e.g AUDIO_FORMAT_PCM_16_BIT for signed * 16 bits per sample). * 16 bits per sample). * channelMask: Channel mask: see audio_channels_t. * channelMask: Channel mask: see audio_channels_t. * frameCount: Total size of track PCM buffer in frames. This defines the * frameCount: Minimum size of track PCM buffer in frames. This defines the * latency of the track. * latency of the track. The actual size selected by the AudioTrack could be * larger if the requested size is not compatible with current audio HAL * latency. * flags: Reserved for future use. * flags: Reserved for future use. * cbf: Callback function. If not null, this function is called periodically * cbf: Callback function. If not null, this function is called periodically * to request new PCM data. * to request new PCM data. Loading media/libmedia/AudioTrack.cpp +3 −6 Original line number Original line Diff line number Diff line Loading @@ -784,13 +784,10 @@ status_t AudioTrack::createTrack_l( mNotificationFramesAct = frameCount/2; mNotificationFramesAct = frameCount/2; } } if (frameCount < minFrameCount) { if (frameCount < minFrameCount) { if (enforceFrameCount) { ALOGW_IF(enforceFrameCount, "Minimum buffer size corrected from %d to %d", ALOGE("Invalid buffer size: minFrameCount %d, frameCount %d", minFrameCount, frameCount); frameCount, minFrameCount); return BAD_VALUE; } else { frameCount = minFrameCount; frameCount = minFrameCount; } } } } else { } else { // Ensure that buffer alignment matches channelCount // Ensure that buffer alignment matches channelCount int channelCount = popcount(channelMask); int channelCount = popcount(channelMask); Loading Loading
include/media/AudioTrack.h +4 −2 Original line number Original line Diff line number Diff line Loading @@ -135,8 +135,10 @@ public: * format: Audio format (e.g AUDIO_FORMAT_PCM_16_BIT for signed * format: Audio format (e.g AUDIO_FORMAT_PCM_16_BIT for signed * 16 bits per sample). * 16 bits per sample). * channelMask: Channel mask: see audio_channels_t. * channelMask: Channel mask: see audio_channels_t. * frameCount: Total size of track PCM buffer in frames. This defines the * frameCount: Minimum size of track PCM buffer in frames. This defines the * latency of the track. * latency of the track. The actual size selected by the AudioTrack could be * larger if the requested size is not compatible with current audio HAL * latency. * flags: Reserved for future use. * flags: Reserved for future use. * cbf: Callback function. If not null, this function is called periodically * cbf: Callback function. If not null, this function is called periodically * to request new PCM data. * to request new PCM data. Loading
media/libmedia/AudioTrack.cpp +3 −6 Original line number Original line Diff line number Diff line Loading @@ -784,13 +784,10 @@ status_t AudioTrack::createTrack_l( mNotificationFramesAct = frameCount/2; mNotificationFramesAct = frameCount/2; } } if (frameCount < minFrameCount) { if (frameCount < minFrameCount) { if (enforceFrameCount) { ALOGW_IF(enforceFrameCount, "Minimum buffer size corrected from %d to %d", ALOGE("Invalid buffer size: minFrameCount %d, frameCount %d", minFrameCount, frameCount); frameCount, minFrameCount); return BAD_VALUE; } else { frameCount = minFrameCount; frameCount = minFrameCount; } } } } else { } else { // Ensure that buffer alignment matches channelCount // Ensure that buffer alignment matches channelCount int channelCount = popcount(channelMask); int channelCount = popcount(channelMask); Loading