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

Commit 3ec73be7 authored by Mingming Yin's avatar Mingming Yin Committed by Linux Build Service Account
Browse files

audio: add support for incall music

- Add AUDIO_STREAM_INCALL_MUSIC to support
  incall music

Change-Id: I84ac4658107d9f9abba2b496d0a1fd1430ced0d6
parent efe93ef1
Loading
Loading
Loading
Loading
+1 −0
Original line number Original line Diff line number Diff line
@@ -912,6 +912,7 @@ static jint android_media_AudioTrack_get_output_sample_rate(JNIEnv *env, jobjec
    case AUDIO_STREAM_NOTIFICATION:
    case AUDIO_STREAM_NOTIFICATION:
    case AUDIO_STREAM_BLUETOOTH_SCO:
    case AUDIO_STREAM_BLUETOOTH_SCO:
    case AUDIO_STREAM_DTMF:
    case AUDIO_STREAM_DTMF:
    case AUDIO_STREAM_INCALL_MUSIC:
        nativeStreamType = (audio_stream_type_t) javaStreamType;
        nativeStreamType = (audio_stream_type_t) javaStreamType;
        break;
        break;
    default:
    default:
+4 −1
Original line number Original line Diff line number Diff line
@@ -347,6 +347,8 @@ public class AudioManager {
    public static final int STREAM_DTMF = AudioSystem.STREAM_DTMF;
    public static final int STREAM_DTMF = AudioSystem.STREAM_DTMF;
    /** @hide The audio stream for text to speech (TTS) */
    /** @hide The audio stream for text to speech (TTS) */
    public static final int STREAM_TTS = AudioSystem.STREAM_TTS;
    public static final int STREAM_TTS = AudioSystem.STREAM_TTS;
    /** @hide The audio stream for incall music delivery */
    public static final int STREAM_INCALL_MUSIC = AudioSystem.STREAM_INCALL_MUSIC;
    /** Number of audio streams */
    /** Number of audio streams */
    /**
    /**
     * @deprecated Use AudioSystem.getNumStreamTypes() instead
     * @deprecated Use AudioSystem.getNumStreamTypes() instead
@@ -365,7 +367,8 @@ public class AudioManager {
        7,  // STREAM_BLUETOOTH_SCO
        7,  // STREAM_BLUETOOTH_SCO
        7,  // STREAM_SYSTEM_ENFORCED
        7,  // STREAM_SYSTEM_ENFORCED
        11, // STREAM_DTMF
        11, // STREAM_DTMF
        11  // STREAM_TTS
        11,  // STREAM_TTS
        4   // STREAM_INCALL_MUSIC
    };
    };


    /**
    /**
+2 −0
Original line number Original line Diff line number Diff line
@@ -55,6 +55,8 @@ public class AudioSystem
    public static final int STREAM_DTMF = 8;
    public static final int STREAM_DTMF = 8;
    /* @hide The audio stream for text to speech (TTS) */
    /* @hide The audio stream for text to speech (TTS) */
    public static final int STREAM_TTS = 9;
    public static final int STREAM_TTS = 9;
    /* @hide The audio stream for incall music delivery */
    public static final int STREAM_INCALL_MUSIC = 10;
    /**
    /**
     * @deprecated Use {@link #numStreamTypes() instead}
     * @deprecated Use {@link #numStreamTypes() instead}
     */
     */