1
0
mirror of https://github.com/qTox/qTox.git synced 2024-03-22 14:00:36 +08:00

converted notification.wav to notification.pcm (raw audio) fixes #256

This commit is contained in:
krepa098 2014-09-10 21:53:18 +02:00 committed by Tux3 / Mlkj / !Lev.uXFMLA
parent 0ae0d01a61
commit b6848772fc
4 changed files with 3 additions and 3 deletions

BIN
audio/notification.pcm Normal file

Binary file not shown.

Binary file not shown.

View File

@ -6,7 +6,6 @@
<file alias="DejaVuSans.ttf">res/DejaVuSans.ttf</file>
</qresource>
<qresource prefix="/">
<file>audio/notification.wav</file>
<file>img/icon.png</file>
<file>img/contact.png</file>
<file>img/contact_dark.png</file>
@ -134,5 +133,6 @@
<file>ui/fileTransferInstance/emptyLRedFileButton.png</file>
<file>ui/fileTransferInstance/emptyRGreenFileButton.png</file>
<file>ui/fileTransferInstance/emptyRRedFileButton.png</file>
<file>audio/notification.pcm</file>
</qresource>
</RCC>

View File

@ -533,7 +533,7 @@ void Widget::newMessageAlert()
{
QApplication::alert(this);
static QFile sndFile(":audio/notification.wav");
static QFile sndFile(":audio/notification.pcm");
static QByteArray sndData;
if (sndData.isEmpty())
{
@ -544,7 +544,7 @@ void Widget::newMessageAlert()
ALuint buffer;
alGenBuffers(1, &buffer);
alBufferData(buffer, AL_FORMAT_STEREO16, sndData.data(), sndData.size(), 44100);
alBufferData(buffer, AL_FORMAT_MONO16, sndData.data(), sndData.size(), 44100);
alSourcei(core->alMainSource, AL_BUFFER, buffer);
alSourcePlay(core->alMainSource);
}