mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-12-10 05:38:49 +00:00
Microphone support (#3228)
* initial drafts * initial implementation * clang+reuse * restore main * improved AudioInInput * fix microphone * + * + * adds microphone selection to the interface * added squidbus review fixes * Update src/core/libraries/audio/audioin.cpp Co-authored-by: squidbus <175574877+squidbus@users.noreply.github.com> * Update src/core/libraries/audio/audioin.cpp Co-authored-by: squidbus <175574877+squidbus@users.noreply.github.com> * Increased entries in config.cpp --------- Co-authored-by: DanielSvoboda <daniel.svoboda@hotmail.com> Co-authored-by: squidbus <175574877+squidbus@users.noreply.github.com>
This commit is contained in:
@@ -55,6 +55,7 @@ static bool useSpecialPad = false;
|
||||
static int specialPadClass = 1;
|
||||
static bool isMotionControlsEnabled = true;
|
||||
static bool useUnifiedInputConfig = true;
|
||||
static std::string micDevice = "Default Device";
|
||||
|
||||
// These two entries aren't stored in the config
|
||||
static bool overrideControllerColor = false;
|
||||
@@ -107,7 +108,7 @@ u32 m_language = 1; // english
|
||||
static std::string trophyKey = "";
|
||||
|
||||
// Expected number of items in the config file
|
||||
static constexpr u64 total_entries = 54;
|
||||
static constexpr u64 total_entries = 55;
|
||||
|
||||
int getVolumeSlider() {
|
||||
return volumeSlider;
|
||||
@@ -201,6 +202,10 @@ int getCursorHideTimeout() {
|
||||
return cursorHideTimeout;
|
||||
}
|
||||
|
||||
std::string getMicDevice() {
|
||||
return micDevice;
|
||||
}
|
||||
|
||||
double getTrophyNotificationDuration() {
|
||||
return trophyNotificationDuration;
|
||||
}
|
||||
@@ -453,6 +458,10 @@ void setCursorHideTimeout(int newcursorHideTimeout) {
|
||||
cursorHideTimeout = newcursorHideTimeout;
|
||||
}
|
||||
|
||||
void setMicDevice(std::string device) {
|
||||
micDevice = device;
|
||||
}
|
||||
|
||||
void setTrophyNotificationDuration(double newTrophyNotificationDuration) {
|
||||
trophyNotificationDuration = newTrophyNotificationDuration;
|
||||
}
|
||||
@@ -652,6 +661,7 @@ void load(const std::filesystem::path& path) {
|
||||
toml::find_or<bool>(input, "isMotionControlsEnabled", isMotionControlsEnabled);
|
||||
useUnifiedInputConfig =
|
||||
toml::find_or<bool>(input, "useUnifiedInputConfig", useUnifiedInputConfig);
|
||||
micDevice = toml::find_or<std::string>(input, "micDevice", micDevice);
|
||||
|
||||
entry_count += input.size();
|
||||
}
|
||||
@@ -836,6 +846,7 @@ void save(const std::filesystem::path& path) {
|
||||
data["Input"]["specialPadClass"] = specialPadClass;
|
||||
data["Input"]["isMotionControlsEnabled"] = isMotionControlsEnabled;
|
||||
data["Input"]["useUnifiedInputConfig"] = useUnifiedInputConfig;
|
||||
data["Input"]["micDevice"] = micDevice;
|
||||
data["GPU"]["screenWidth"] = windowWidth;
|
||||
data["GPU"]["screenHeight"] = windowHeight;
|
||||
data["GPU"]["internalScreenWidth"] = internalScreenWidth;
|
||||
@@ -938,6 +949,7 @@ void setDefaultValues() {
|
||||
controllerCustomColorRGB[0] = 0;
|
||||
controllerCustomColorRGB[1] = 0;
|
||||
controllerCustomColorRGB[2] = 255;
|
||||
micDevice = "Default Device";
|
||||
|
||||
// GPU
|
||||
windowWidth = 1280;
|
||||
|
||||
@@ -85,7 +85,9 @@ void setLogFilter(const std::string& type);
|
||||
double getTrophyNotificationDuration();
|
||||
void setTrophyNotificationDuration(double newTrophyNotificationDuration);
|
||||
int getCursorHideTimeout();
|
||||
std::string getMicDevice();
|
||||
void setCursorHideTimeout(int newcursorHideTimeout);
|
||||
void setMicDevice(std::string device);
|
||||
void setSeparateLogFilesEnabled(bool enabled);
|
||||
bool getSeparateLogFilesEnabled();
|
||||
u32 GetLanguage();
|
||||
|
||||
Reference in New Issue
Block a user