small merge fixes
This commit is contained in:
parent
48387d4add
commit
7df3ce1115
3 changed files with 19 additions and 10 deletions
|
@ -140,7 +140,9 @@ win32 {
|
||||||
INSTALLS += target
|
INSTALLS += target
|
||||||
|
|
||||||
HEADERS += android/sound.h
|
HEADERS += android/sound.h
|
||||||
SOURCES += android/sound.cpp
|
SOURCES += android/sound.cpp \
|
||||||
|
android/androiddebug.cpp
|
||||||
|
|
||||||
LIBS += -lOpenSLES
|
LIBS += -lOpenSLES
|
||||||
ANDROID_PACKAGE_SOURCE_DIR = $$PWD/android
|
ANDROID_PACKAGE_SOURCE_DIR = $$PWD/android
|
||||||
OTHER_FILES += android/AndroidManifest.xml
|
OTHER_FILES += android/AndroidManifest.xml
|
||||||
|
@ -433,7 +435,6 @@ android {
|
||||||
}
|
}
|
||||||
|
|
||||||
SOURCES += src/audiomixerboard.cpp \
|
SOURCES += src/audiomixerboard.cpp \
|
||||||
android/androiddebug.cpp \
|
|
||||||
src/buffer.cpp \
|
src/buffer.cpp \
|
||||||
src/channel.cpp \
|
src/channel.cpp \
|
||||||
src/chatdlg.cpp \
|
src/chatdlg.cpp \
|
||||||
|
|
|
@ -258,8 +258,8 @@ typedef unsigned __int64 uint64_t;
|
||||||
typedef unsigned __int32 uint32_t;
|
typedef unsigned __int32 uint32_t;
|
||||||
typedef unsigned __int16 uint16_t;
|
typedef unsigned __int16 uint16_t;
|
||||||
typedef unsigned __int8 uint8_t;
|
typedef unsigned __int8 uint8_t;
|
||||||
#elif defined ( __ANDROID__ )
|
#elif defined ( ANDROID )
|
||||||
/* don't redfine types for android as these ones below don't work. */
|
// don't redfine types for android as these ones below don't work
|
||||||
#else
|
#else
|
||||||
typedef long long int64_t;
|
typedef long long int64_t;
|
||||||
typedef int int32_t;
|
typedef int int32_t;
|
||||||
|
|
10
src/main.cpp
10
src/main.cpp
|
@ -37,6 +37,7 @@
|
||||||
# include <QtAndroidExtras/QtAndroid>
|
# include <QtAndroidExtras/QtAndroid>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
// Implementation **************************************************************
|
// Implementation **************************************************************
|
||||||
|
|
||||||
int main ( int argc, char** argv )
|
int main ( int argc, char** argv )
|
||||||
|
@ -524,13 +525,20 @@ int main ( int argc, char** argv )
|
||||||
QCoreApplication* pApp = bUseGUI
|
QCoreApplication* pApp = bUseGUI
|
||||||
? new QApplication ( argc, argv )
|
? new QApplication ( argc, argv )
|
||||||
: new QCoreApplication ( argc, argv );
|
: new QCoreApplication ( argc, argv );
|
||||||
|
|
||||||
#ifdef ANDROID
|
#ifdef ANDROID
|
||||||
|
// special Android coded needed for record audio permission handling
|
||||||
auto result = QtAndroid::checkPermission ( QString ( "android.permission.RECORD_AUDIO" ) );
|
auto result = QtAndroid::checkPermission ( QString ( "android.permission.RECORD_AUDIO" ) );
|
||||||
if(result == QtAndroid::PermissionResult::Denied){
|
|
||||||
|
if ( result == QtAndroid::PermissionResult::Denied )
|
||||||
|
{
|
||||||
QtAndroid::PermissionResultMap resultHash = QtAndroid::requestPermissionsSync ( QStringList ( { "android.permission.RECORD_AUDIO" } ) );
|
QtAndroid::PermissionResultMap resultHash = QtAndroid::requestPermissionsSync ( QStringList ( { "android.permission.RECORD_AUDIO" } ) );
|
||||||
|
|
||||||
if ( resultHash["android.permission.RECORD_AUDIO"] == QtAndroid::PermissionResult::Denied )
|
if ( resultHash["android.permission.RECORD_AUDIO"] == QtAndroid::PermissionResult::Denied )
|
||||||
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
|
|
Loading…
Reference in a new issue