setAudioProfile method

  1. @override
Future<void> setAudioProfile(
  1. AudioProfile profile,
  2. AudioScenario scenario
)

Sets the audio parameters and application scenarios.

Note

Parameter profile Sets the sample rate, bitrate, encoding mode, and the number of channels. See AudioProfile.

Parameter scenario Sets the audio application scenarios. Under different audio scenarios, the device uses different volume tracks, i.e. either the in-call volume or the media volume. See AudioScenario.

Implementation

@override
Future<void> setAudioProfile(AudioProfile profile, AudioScenario scenario) {
  return _invokeMethod('setAudioProfile', {
    'profile': AudioProfileConverter(profile).value(),
    'scenario': AudioScenarioConverter(scenario).value()
  });
}