Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b01ea193 authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "Set bits per sample for FLAC and WAV"

parents 90a050ec 8ebd01a4
Loading
Loading
Loading
Loading
+1 −0
Original line number Original line Diff line number Diff line
@@ -618,6 +618,7 @@ status_t FLACParser::init()
            mTrackMetadata->setCString(kKeyMIMEType, MEDIA_MIMETYPE_AUDIO_RAW);
            mTrackMetadata->setCString(kKeyMIMEType, MEDIA_MIMETYPE_AUDIO_RAW);
            mTrackMetadata->setInt32(kKeyChannelCount, getChannels());
            mTrackMetadata->setInt32(kKeyChannelCount, getChannels());
            mTrackMetadata->setInt32(kKeySampleRate, getSampleRate());
            mTrackMetadata->setInt32(kKeySampleRate, getSampleRate());
            mTrackMetadata->setInt32(kKeyBitsPerSample, getBitsPerSample());
            mTrackMetadata->setInt32(kKeyPcmEncoding, kAudioEncodingPcm16bit);
            mTrackMetadata->setInt32(kKeyPcmEncoding, kAudioEncodingPcm16bit);
            // sample rate is non-zero, so division by zero not possible
            // sample rate is non-zero, so division by zero not possible
            mTrackMetadata->setInt64(kKeyDuration,
            mTrackMetadata->setInt64(kKeyDuration,
+1 −0
Original line number Original line Diff line number Diff line
@@ -310,6 +310,7 @@ status_t WAVExtractor::init() {
                mTrackMeta.setInt32(kKeyChannelCount, mNumChannels);
                mTrackMeta.setInt32(kKeyChannelCount, mNumChannels);
                mTrackMeta.setInt32(kKeyChannelMask, mChannelMask);
                mTrackMeta.setInt32(kKeyChannelMask, mChannelMask);
                mTrackMeta.setInt32(kKeySampleRate, mSampleRate);
                mTrackMeta.setInt32(kKeySampleRate, mSampleRate);
                mTrackMeta.setInt32(kKeyBitsPerSample, mBitsPerSample);
                mTrackMeta.setInt32(kKeyPcmEncoding, kAudioEncodingPcm16bit);
                mTrackMeta.setInt32(kKeyPcmEncoding, kAudioEncodingPcm16bit);


                int64_t durationUs = 0;
                int64_t durationUs = 0;