mirror of
https://github.com/Palakis/obs-websocket.git
synced 2024-08-30 18:12:16 +00:00
lib,requesthandler,eventhandler: Fix C4244 & C4334 warnings
This commit is contained in:
parent
e3314b3608
commit
b5d50c4243
@ -96,7 +96,7 @@ static inline unsigned int obs_websocket_get_api_version(void)
|
|||||||
if (!proc_handler_call(_ph, "get_api_version", &cd))
|
if (!proc_handler_call(_ph, "get_api_version", &cd))
|
||||||
return 1; // API v1 does not include get_api_version
|
return 1; // API v1 does not include get_api_version
|
||||||
|
|
||||||
unsigned int ret = calldata_int(&cd, "version");
|
unsigned int ret = (unsigned int)calldata_int(&cd, "version");
|
||||||
|
|
||||||
calldata_free(&cd);
|
calldata_free(&cd);
|
||||||
|
|
||||||
|
@ -225,7 +225,7 @@ void EventHandler::HandleInputVolumeChanged(void *param, calldata_t *data)
|
|||||||
// Volume must be grabbed from the calldata. Running obs_source_get_volume() will return the previous value.
|
// Volume must be grabbed from the calldata. Running obs_source_get_volume() will return the previous value.
|
||||||
double inputVolumeMul = calldata_float(data, "volume");
|
double inputVolumeMul = calldata_float(data, "volume");
|
||||||
|
|
||||||
double inputVolumeDb = obs_mul_to_db(inputVolumeMul);
|
double inputVolumeDb = obs_mul_to_db((float)inputVolumeMul);
|
||||||
if (inputVolumeDb == -INFINITY)
|
if (inputVolumeDb == -INFINITY)
|
||||||
inputVolumeDb = -100;
|
inputVolumeDb = -100;
|
||||||
|
|
||||||
|
@ -820,9 +820,9 @@ RequestResult RequestHandler::SetInputAudioTracks(const Request &request)
|
|||||||
|
|
||||||
json inputAudioTracks = request.RequestData["inputAudioTracks"];
|
json inputAudioTracks = request.RequestData["inputAudioTracks"];
|
||||||
|
|
||||||
long long mixers = obs_source_get_audio_mixers(input);
|
uint32_t mixers = obs_source_get_audio_mixers(input);
|
||||||
|
|
||||||
for (long long i = 0; i < MAX_AUDIO_MIXES; i++) {
|
for (uint32_t i = 0; i < MAX_AUDIO_MIXES; i++) {
|
||||||
std::string track = std::to_string(i + 1);
|
std::string track = std::to_string(i + 1);
|
||||||
|
|
||||||
if (!Utils::Json::Contains(inputAudioTracks, track))
|
if (!Utils::Json::Contains(inputAudioTracks, track))
|
||||||
|
Loading…
Reference in New Issue
Block a user