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:
parent
0ae0d01a61
commit
b6848772fc
BIN
audio/notification.pcm
Normal file
BIN
audio/notification.pcm
Normal file
Binary file not shown.
Binary file not shown.
2
res.qrc
2
res.qrc
|
@ -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>
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user