Browse Source

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

pull/282/head
krepa098 11 years ago committed by Tux3 / Mlkj / !Lev.uXFMLA
parent
commit
b6848772fc
  1. BIN
      audio/notification.pcm
  2. BIN
      audio/notification.wav
  3. 2
      res.qrc
  4. 4
      widget/widget.cpp

BIN
audio/notification.pcm

Binary file not shown.

BIN
audio/notification.wav

Binary file not shown.

2
res.qrc

@ -6,7 +6,6 @@ @@ -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 @@ @@ -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>

4
widget/widget.cpp

@ -533,7 +533,7 @@ void Widget::newMessageAlert() @@ -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() @@ -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…
Cancel
Save