-rw-r--r-- | library/sound.cpp | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/library/sound.cpp b/library/sound.cpp index 5b67995..ee2aabc 100644 --- a/library/sound.cpp +++ b/library/sound.cpp | |||
@@ -12,50 +12,48 @@ | |||
12 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. | 12 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. |
13 | ** | 13 | ** |
14 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. | 14 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. |
15 | ** | 15 | ** |
16 | ** Contact info@trolltech.com if any conditions of this licensing are | 16 | ** Contact info@trolltech.com if any conditions of this licensing are |
17 | ** not clear to you. | 17 | ** not clear to you. |
18 | ** | 18 | ** |
19 | **********************************************************************/ | 19 | **********************************************************************/ |
20 | 20 | ||
21 | #include <qpe/resource.h> | 21 | #include <qpe/resource.h> |
22 | #include <qpe/sound.h> | 22 | #include <qpe/sound.h> |
23 | #include <qpe/qcopenvelope_qws.h> | 23 | #include <qpe/qcopenvelope_qws.h> |
24 | 24 | ||
25 | #include <qsound.h> | 25 | #include <qsound.h> |
26 | #include <qfile.h> | 26 | #include <qfile.h> |
27 | 27 | ||
28 | #include <unistd.h> | 28 | #include <unistd.h> |
29 | #include <fcntl.h> | 29 | #include <fcntl.h> |
30 | #include <sys/ioctl.h> | 30 | #include <sys/ioctl.h> |
31 | 31 | ||
32 | #ifndef QT_NO_SOUND | 32 | #ifndef QT_NO_SOUND |
33 | #include <sys/soundcard.h> | 33 | #include <sys/soundcard.h> |
34 | #endif | 34 | #endif |
35 | 35 | ||
36 | #include "config.h" | ||
37 | #include <qmessagebox.h> | ||
38 | #ifndef QT_NO_SOUND | 36 | #ifndef QT_NO_SOUND |
39 | static int WAVsoundDuration(const QString& filename) | 37 | static int WAVsoundDuration(const QString& filename) |
40 | { | 38 | { |
41 | // bad solution | 39 | // bad solution |
42 | 40 | ||
43 | // most of this is copied from qsoundqss.cpp | 41 | // most of this is copied from qsoundqss.cpp |
44 | 42 | ||
45 | QFile input(filename); | 43 | QFile input(filename); |
46 | if ( !input.open(IO_ReadOnly) ) | 44 | if ( !input.open(IO_ReadOnly) ) |
47 | return 0; | 45 | return 0; |
48 | 46 | ||
49 | struct QRiffChunk { | 47 | struct QRiffChunk { |
50 | char id[4]; | 48 | char id[4]; |
51 | Q_UINT32 size; | 49 | Q_UINT32 size; |
52 | char data[4/*size*/]; | 50 | char data[4/*size*/]; |
53 | } chunk; | 51 | } chunk; |
54 | 52 | ||
55 | struct { | 53 | struct { |
56 | Q_INT16 formatTag; | 54 | Q_INT16 formatTag; |
57 | Q_INT16 channels; | 55 | Q_INT16 channels; |
58 | Q_INT32 samplesPerSec; | 56 | Q_INT32 samplesPerSec; |
59 | Q_INT32 avgBytesPerSec; | 57 | Q_INT32 avgBytesPerSec; |
60 | Q_INT16 blockAlign; | 58 | Q_INT16 blockAlign; |
61 | Q_INT16 wBitsPerSample; | 59 | Q_INT16 wBitsPerSample; |