新手玩家,入门教程,记录学习。
测试平台大概说明下, mde2.6 adk toolkit 1.2.9.25 ADK-21.1-CS-r00073.2
修改一个地方即可,不确定这个方法是否可以动态按键调节,有待测试研究。 adk\src\domains\audio\kymera\kymera_a2dp_analog_source.c static Source kymeraA2dpAnalogSource_GetSource(audio_channel channel, uint8 inst, uint32 rate)
{
#define SAMPLE_SIZE 16 /* only if 24 bit resolution is supported this can be 24 */
Source source;
analogue_input_params params = {
.pre_amp = FALSE,
//.gain = 0x09, /* for line-in set to 0dB */
.gain = 0x15,
.instance = 0, /* Place holder */
.enable_24_bit_resolution = FALSE
};
DEBUG_LOG_VERBOSE("SourcekymeraWiredAnalog_GetSource, Get source for Channel: %u, Instance: %u and Sample Rate: %u", channel, inst, rate);
params.instance = inst;
source = AudioPluginAnalogueInputSetup(channel, params, rate);
PanicFalse(SourceConfigure(source, STREAM_AUDIO_SAMPLE_SIZE, SAMPLE_SIZE));
return source;
}

|