WM8731_SetVolume from example code was creating problem. It is better to have two
different functions SetInputVolume and SetOutputVolume
Code: Select all
sub procedure WM8731_SetVolume(dim LeftCh, RightCh as byte)
dim temp as word
if LeftCh > 80 then
LeftCh = 80
end if
if RightCh > 80 then
RightCh = 80
end if
temp = LeftCh + 0x00AF
WM8731_CMD(WM8731_Reg_Lhphone_out, temp) 'left headphone out
'WM8731_CMD(WM8731_REG_LLINE_IN, temp) 'Creates problem - mute Left LINE_IN when LINE_IN is enabled
temp = RightCh + 0x00AF
WM8731_CMD(WM8731_Reg_Rhphone_out, temp) 'right headphone out
'WM8731_CMD(WM8731_REG_RLINE_IN, temp) 'Creates problem - mute RightLINE_IN when LINE_IN is enabled
end sub
Code: Select all
'WM8731_CMD(WM8731_REG_LLINE_IN, temp) 'Creates problem - mute Left LINE_IN when LINE_IN is enabled
Code: Select all
'WM8731_CMD(WM8731_REG_RLINE_IN, temp) 'Creates problem - mute Right LINE_IN when LINE_IN is enabled