mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-05 14:31:24 +12:00
cellMic: Improve cellMicGetDeviceAttr
This commit is contained in:
parent
f398f1113d
commit
cf20526f9f
2 changed files with 9 additions and 10 deletions
|
@ -861,21 +861,20 @@ error_code cellMicGetDeviceAttr(s32 dev_num, CellMicDeviceAttr deviceAttributes,
|
||||||
{
|
{
|
||||||
switch (deviceAttributes)
|
switch (deviceAttributes)
|
||||||
{
|
{
|
||||||
|
case CELLMIC_DEVATTR_CHANVOL:
|
||||||
|
if (*arg1 > 2 || !arg2)
|
||||||
|
return CELL_MICIN_ERROR_PARAM;
|
||||||
|
*arg2 = ::at32(device.attr_chanvol, *arg1);
|
||||||
|
break;
|
||||||
case CELLMIC_DEVATTR_LED: *arg1 = device.attr_led; break;
|
case CELLMIC_DEVATTR_LED: *arg1 = device.attr_led; break;
|
||||||
case CELLMIC_DEVATTR_GAIN: *arg1 = device.attr_gain; break;
|
case CELLMIC_DEVATTR_GAIN: *arg1 = device.attr_gain; break;
|
||||||
case CELLMIC_DEVATTR_VOLUME: *arg1 = device.attr_volume; break;
|
case CELLMIC_DEVATTR_VOLUME: *arg1 = device.attr_volume; break;
|
||||||
case CELLMIC_DEVATTR_AGC: *arg1 = device.attr_agc; break;
|
case CELLMIC_DEVATTR_AGC: *arg1 = device.attr_agc; break;
|
||||||
case CELLMIC_DEVATTR_CHANVOL: *arg1 = device.attr_volume; break;
|
|
||||||
case CELLMIC_DEVATTR_DSPTYPE: *arg1 = device.attr_dsptype; break;
|
case CELLMIC_DEVATTR_DSPTYPE: *arg1 = device.attr_dsptype; break;
|
||||||
default: return CELL_MICIN_ERROR_PARAM;
|
default: return CELL_MICIN_ERROR_PARAM;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (arg2)
|
|
||||||
{
|
|
||||||
// TODO
|
|
||||||
}
|
|
||||||
|
|
||||||
return CELL_OK;
|
return CELL_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -307,10 +307,10 @@ public:
|
||||||
u32 read_dsp(u8* buf, u32 size) { return rbuf_dsp.read_bytes(buf, size); }
|
u32 read_dsp(u8* buf, u32 size) { return rbuf_dsp.read_bytes(buf, size); }
|
||||||
|
|
||||||
// Microphone attributes
|
// Microphone attributes
|
||||||
u32 attr_gain = 3;
|
u32 attr_gain = 3; // 0 to 5. Default is 3.
|
||||||
u32 attr_volume = 145;
|
u32 attr_volume = 145; // 0 to 241. Default is 145.
|
||||||
u32 attr_agc = 0;
|
u32 attr_agc = 0; // 0 to 241. Default is 0.
|
||||||
std::array<u32, 2> attr_chanvol = {145, 145};
|
std::array<u32, 2> attr_chanvol = {100, 100}; // 0 to 100. Default is ?.
|
||||||
u32 attr_led = 0;
|
u32 attr_led = 0;
|
||||||
u32 attr_dsptype = 0;
|
u32 attr_dsptype = 0;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue