Selaa lähdekoodia

coreaudio-encoder: Fix mingw warnings

jp9000 10 vuotta sitten
vanhempi
sitoutus
aa0e64b7c9

+ 5 - 0
plugins/coreaudio-encoder/CMakeLists.txt

@@ -6,6 +6,11 @@ set(coreaudio-encoder_SOURCES
 if (WIN32)
 	set(coreaudio-encoder_HEADERS windows-imports.h)
 	set(coreaudio-encoder_LIBS )
+
+	if (MINGW)
+		set_source_files_properties(${coreaudio-encoder_SOURCES}
+			PROPERTIES COMPILE_FLAGS "-Wno-multichar")
+	endif()
 else()
 	find_library(COREFOUNDATION CoreFoundation)
 	find_library(COREAUDIO CoreAudio)

+ 2 - 1
plugins/coreaudio-encoder/encoder.c

@@ -470,7 +470,8 @@ static void *aac_create(obs_data_t *settings, obs_encoder_t *encoder)
 			"\tsample rate:   %llu\n"
 			"\tcbr:           %s\n"
 			"\toutput buffer: %lu",
-			format_name, bitrate / 1000, ca->samples_per_second,
+			format_name, (unsigned int)bitrate / 1000,
+			ca->samples_per_second,
 			rate_control == kAudioCodecBitRateControlMode_Constant ?
 			"on" : "off",
 			(unsigned long)ca->output_buffer_size);