mirror of
https://github.com/KytyPS5/KytyPS5.git
synced 2026-10-29 08:41:20 +00:00
audio: fix microphone input format decoding
This commit is contained in:
1 parent
1fd07c2c83
commit
3cf426662e
1 file changed
+2
-9
+2
-9
@@ -811,22 +811,15 @@ int KYTY_SYSV_ABI AudioInOpen(int user_id, uint32_t type, uint32_t index, uint32
|
|||||||
"\t freq = %u\n",
|
"\t freq = %u\n",
|
||||||
user_id, type, index, len, freq);
|
user_id, type, index, len, freq);
|
||||||
|
|
||||||
if (user_id != 255 && user_id != 1) {
|
|
||||||
LOGF("\t temporary: accepting unsupported audio input user_id %d\n", user_id);
|
|
||||||
}
|
|
||||||
EXIT_NOT_IMPLEMENTED(type != 1);
|
EXIT_NOT_IMPLEMENTED(type != 1);
|
||||||
EXIT_NOT_IMPLEMENTED(index != 0);
|
EXIT_NOT_IMPLEMENTED(index != 0);
|
||||||
|
|
||||||
Audio::Format format = Audio::Format::Unknown;
|
Audio::Format format = Audio::Format::Unknown;
|
||||||
|
|
||||||
switch (param) {
|
switch (param) {
|
||||||
case 0: format = Audio::Format::Signed16bitMono; break;
|
case 1: format = Audio::Format::Signed16bitMono; break;
|
||||||
case 2: format = Audio::Format::Signed16bitStereo; break;
|
case 2: format = Audio::Format::Signed16bitStereo; break;
|
||||||
default:
|
default: return AUDIO_IN_ERROR_INVALID_PARAM;
|
||||||
LOGF("\t temporary: using signed 16-bit stereo for unsupported audio input param %u\n",
|
|
||||||
param);
|
|
||||||
format = Audio::Format::Signed16bitStereo;
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
LOGF("\t param = %u (%s)\n", param, Common::EnumName(format).c_str());
|
LOGF("\t param = %u (%s)\n", param, Common::EnumName(format).c_str());
|
||||||
|
|||||||
Reference in new issue
Block a user