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

Commit 41c64964 authored by Narsinga Rao Chella's avatar Narsinga Rao Chella Committed by Steve Kondik
Browse files

system: Support for offloading Java audio tracks

Offload Java audio tracks if the property is set.
This is used to avoid mixing in audioflinger and
to apply effects in DSP. Also update function to
calculate bytes per sample for offload format.

Change-Id: I0705e70a806a335e372e844de8a1210fbfe58cd7
parent 3cdd37fd
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -863,7 +863,9 @@ static const audio_offload_info_t AUDIO_INFO_INITIALIZER = {
    bit_rate: 0,
    duration_us: 0,
    has_video: false,
    is_streaming: false
    is_streaming: false,
    bit_width: 16,
    use_small_bufs: false,
};

/* common audio stream configuration parameters
@@ -1505,6 +1507,7 @@ static inline size_t audio_bytes_per_sample(audio_format_t format)
        size = sizeof(uint8_t) * 3;
        break;
    case AUDIO_FORMAT_PCM_16_BIT:
    case AUDIO_FORMAT_PCM_16_BIT_OFFLOAD:
        size = sizeof(int16_t);
        break;
    case AUDIO_FORMAT_PCM_8_BIT: