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

Commit b4fae5ba authored by Eric Laurent's avatar Eric Laurent
Browse files

Add Dolby TrueHD audio format

Format is not public for now.
Unhide at next API bump.

Bug: 30024357
Change-Id: Ic307214d8ac8b7bb57609bf609366968efafd7cc
parent 3c75a038
Loading
Loading
Loading
Loading
+18 −12
Original line number Diff line number Diff line
@@ -32,6 +32,8 @@
#define ENCODING_AAC_HE_V1      11
#define ENCODING_AAC_HE_V2      12
#define ENCODING_IEC61937       13
#define ENCODING_DOLBY_TRUEHD   14

#define ENCODING_INVALID    0
#define ENCODING_DEFAULT    1

@@ -65,6 +67,8 @@ static inline audio_format_t audioFormatToNative(int audioFormat)
        return AUDIO_FORMAT_AAC_HE_V1;
    case ENCODING_AAC_HE_V2:
        return AUDIO_FORMAT_AAC_HE_V2;
    case ENCODING_DOLBY_TRUEHD:
        return AUDIO_FORMAT_DOLBY_TRUEHD;
    case ENCODING_IEC61937:
        return AUDIO_FORMAT_IEC61937;
    case ENCODING_DEFAULT:
@@ -108,6 +112,8 @@ static inline int audioFormatFromNative(audio_format_t nativeFormat)
        return ENCODING_AAC_HE_V2;
    case AUDIO_FORMAT_IEC61937:
        return ENCODING_IEC61937;
    case AUDIO_FORMAT_DOLBY_TRUEHD:
        return ENCODING_DOLBY_TRUEHD;
    case AUDIO_FORMAT_DEFAULT:
        return ENCODING_DEFAULT;
    default:
+4 −0
Original line number Diff line number Diff line
@@ -263,6 +263,10 @@ public final class AudioFormat implements Parcelable {
     * on some platforms when converting to short internally.
     */
    public static final int ENCODING_IEC61937 = 13;
    /** Audio data format: DOLBY TRUEHD compressed
     * @hide
     **/
    public static final int ENCODING_DOLBY_TRUEHD = 14;

    /** Invalid audio channel configuration */
    /** @deprecated Use {@link #CHANNEL_INVALID} instead.  */