mirror of
https://github.com/vale981/tdesktop
synced 2025-03-06 02:01:40 -05:00
prepared openal sound and voice messages in linux
This commit is contained in:
parent
57cbc06fd8
commit
25c19812e1
5 changed files with 28 additions and 7 deletions
14
QTCREATOR.md
14
QTCREATOR.md
|
@ -30,7 +30,19 @@ or download in ZIP and extract to **/home/user/TBuild** rename **tdesktop-master
|
|||
|
||||
Install dev libraries
|
||||
|
||||
sudo apt-get install libexif-dev liblzma-dev libz-dev libssl-dev
|
||||
sudo apt-get install libexif-dev liblzma-dev libz-dev libssl-dev libogg-dev libopus-dev libopusfile-dev
|
||||
|
||||
Install OpenAL Soft
|
||||
|
||||
In Terminal go to **/home/user/TBuild/Libraries** and run
|
||||
|
||||
git clone git://repo.or.cz/openal-soft.git
|
||||
|
||||
then go to **/home/user/TBuild/Libraries/openal-soft/build** and run
|
||||
|
||||
cmake -D LIBTYPE:STRING=STATIC ..
|
||||
make
|
||||
sudo make install
|
||||
|
||||
####Qt 5.3.1, slightly patched
|
||||
|
||||
|
|
|
@ -14,4 +14,7 @@ sed -i 's/\-lssl/\/usr\/lib\/x86_64\-linux\-gnu\/libssl\.a/g' Makefile
|
|||
sed -i 's/\-lcrypto/\/usr\/lib\/x86_64\-linux\-gnu\/libcrypto\.a/g' Makefile
|
||||
sed -i 's/\-lexif/\/usr\/lib\/x86_64\-linux\-gnu\/libexif\.a/g' Makefile
|
||||
sed -i 's/\-lglib\-2\.0/\/usr\/lib\/x86_64\-linux\-gnu\/libglib\-2\.0\.a/g' Makefile
|
||||
|
||||
sed -i 's/\-lopusfile/\/usr\/lib\/libopusfile\.a/g' Makefile
|
||||
sed -i 's/\-lopus/\/usr\/lib\/x86_64\-linux\-gnu\/libopus\.a/g' Makefile
|
||||
sed -i 's/\-lopenal/\/usr\/local\/lib\/libopenal\.a/g' Makefile
|
||||
sed -i 's/\-logg/\/usr\/lib\/x86_64\-linux\-gnu\/libogg\.a/g' Makefile
|
||||
|
|
|
@ -14,4 +14,7 @@ sed -i 's/\-lssl/\/usr\/lib\/i386\-linux\-gnu\/libssl\.a/g' Makefile
|
|||
sed -i 's/\-lcrypto/\/usr\/lib\/i386\-linux\-gnu\/libcrypto\.a/g' Makefile
|
||||
sed -i 's/\-lexif/\/usr\/lib\/i386\-linux\-gnu\/libexif\.a/g' Makefile
|
||||
sed -i 's/\-lglib\-2\.0/\/usr\/lib\/i386\-linux\-gnu\/libglib\-2\.0\.a/g' Makefile
|
||||
|
||||
sed -i 's/\-lopusfile/\/usr\/lib\/libopusfile\.a/g' Makefile
|
||||
sed -i 's/\-lopus/\/usr\/lib\/i386\-linux\-gnu\/libopus\.a/g' Makefile
|
||||
sed -i 's/\-lopenal/\/usr\/local\/lib\/libopenal\.a/g' Makefile
|
||||
sed -i 's/\-logg/\/usr\/lib\/i386\-linux\-gnu\/libogg\.a/g' Makefile
|
||||
|
|
|
@ -113,7 +113,7 @@ void audioInit() {
|
|||
|
||||
if (extra) {
|
||||
uint16 extraSize = *((const uint16*)(data + 36));
|
||||
if (extraSize + 2 != extra) return audioFinish();
|
||||
if (uint32(extraSize + 2) != extra) return audioFinish();
|
||||
if (uint32(blob.size()) < 44 + extra) return audioFinish();
|
||||
}
|
||||
|
||||
|
@ -546,7 +546,7 @@ void VoiceMessagesLoader::onLoad(AudioData *audio) {
|
|||
}
|
||||
|
||||
bool finished = false;
|
||||
DEBUG_LOG(("Audio Info: reading buffer for file '%1', data size '%2', current pcm_offset %2").arg(l->fname).arg(l->data.size()).arg(l->pcm_offset));
|
||||
DEBUG_LOG(("Audio Info: reading buffer for file '%1', data size '%2', current pcm_offset %3").arg(l->fname).arg(l->data.size()).arg(l->pcm_offset));
|
||||
|
||||
QByteArray result;
|
||||
int64 samplesAdded = 0;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
QT += core gui network multimedia widgets
|
||||
QT += core gui network widgets
|
||||
|
||||
CONFIG += plugin static
|
||||
|
||||
|
@ -81,6 +81,7 @@ SOURCES += \
|
|||
./SourceFiles/stdafx.cpp \
|
||||
./SourceFiles/app.cpp \
|
||||
./SourceFiles/application.cpp \
|
||||
./SourceFiles/audio.cpp \
|
||||
./SourceFiles/dialogswidget.cpp \
|
||||
./SourceFiles/dropdown.cpp \
|
||||
./SourceFiles/fileuploader.cpp \
|
||||
|
@ -149,6 +150,7 @@ HEADERS += \
|
|||
./SourceFiles/stdafx.h \
|
||||
./SourceFiles/app.h \
|
||||
./SourceFiles/application.h \
|
||||
./SourceFiles/audio.h \
|
||||
./SourceFiles/config.h \
|
||||
./SourceFiles/countries.h \
|
||||
./SourceFiles/dialogswidget.h \
|
||||
|
@ -253,9 +255,10 @@ CONFIG(release, debug|release) {
|
|||
INCLUDEPATH += ./../../Libraries/QtStatic/qtbase/include/QtGui/5.3.1/QtGui\
|
||||
./../../Libraries/QtStatic/qtbase/include/QtCore/5.3.1/QtCore\
|
||||
./../../Libraries/QtStatic/qtbase/include\
|
||||
/usr/include/opus\
|
||||
./SourceFiles\
|
||||
./GeneratedFiles
|
||||
LIBS += -lcrypto -lssl -lz -ldl -llzma -lexif
|
||||
LIBS += -lcrypto -lssl -lz -ldl -llzma -lexif -lopus -lopusfile -logg -lopenal
|
||||
LIBS += ./../../../Libraries/QtStatic/qtbase/plugins/platforminputcontexts/libcomposeplatforminputcontextplugin.a
|
||||
|
||||
RESOURCES += \
|
||||
|
|
Loading…
Add table
Reference in a new issue