summaryrefslogtreecommitdiff
path: root/qt
authorbipolar <bipolar>2002-02-01 18:29:21 (UTC)
committer bipolar <bipolar>2002-02-01 18:29:21 (UTC)
commit9a8990097aa35d28a9c758f730c5c8b5fa59560a (patch) (unidiff)
treecc0bcc68d1090a0ae8b738f4223b5dc297bdc125 /qt
parent96f799b935cda52dfed323cadb9025ba1ae737df (diff)
downloadopie-9a8990097aa35d28a9c758f730c5c8b5fa59560a.zip
opie-9a8990097aa35d28a9c758f730c5c8b5fa59560a.tar.gz
opie-9a8990097aa35d28a9c758f730c5c8b5fa59560a.tar.bz2
Add patch for qte-232 for qsound fix for iPaq.
Diffstat (limited to 'qt') (more/less context) (ignore whitespace changes)
-rw-r--r--qt/qte232-for-qpe150.patch64
1 files changed, 64 insertions, 0 deletions
diff --git a/qt/qte232-for-qpe150.patch b/qt/qte232-for-qpe150.patch
new file mode 100644
index 0000000..3acb3d1
--- a/dev/null
+++ b/qt/qte232-for-qpe150.patch
@@ -0,0 +1,64 @@
1 --- src/kernel/qsoundqss_qws.cpp.origWed Jan 30 12:49:24 2002
2 +++ src/kernel/qsoundqss_qws.cppWed Jan 30 12:47:41 2002
3@@ -142,6 +142,19 @@ public:
4 return wavedata_remaining < 0 || !max;
5 }
6 private:
7+ int getOneSample()
8+ {
9 +int sample;
10 +if ( chunkdata.wBitsPerSample == 8 ) {
11 + sample = (data[out++] - 128) * 128;
12 + wavedata_remaining--;
13 +} else {
14 + sample = ((short*)data)[out/2];
15 + out += 2;
16 + wavedata_remaining -= 2;
17 +}
18 +return sample;
19+ }
20 void getSample(int& l, int& r)
21 {
22 l = r = 0;
23@@ -152,38 +165,22 @@ private:
24 if ( out >= max ) {
25 max = dev->readBlock((char*)data,
26 (uint)QMIN(sound_buffer_size,wavedata_remaining));
27 - wavedata_remaining -= max;
28 out = 0;
29 if ( max <= 0 ) {
30 max = 0;
31 return;
32 }
33 }
34 - if ( chunkdata.wBitsPerSample == 8 ) {
35 - l = (data[out++] - 128) * 128;
36 - } else {
37 - l = ((short*)data)[out/2];
38 - out += 2;
39 - }
40 + l = getOneSample();
41 if ( sound_stereo ) {
42 if ( chunkdata.channels == 1 ) {
43 r = l;
44 } else {
45 - if ( chunkdata.wBitsPerSample == 8 ) {
46 - r = (data[out++] - 128) * 128;
47 - } else {
48 - r = ((short*)data)[out/2];
49 - out += 2;
50 - }
51 + r = getOneSample();
52 }
53 } else {
54 if ( chunkdata.channels == 2 ) {
55 - if ( chunkdata.wBitsPerSample == 8 ) {
56 - r = (data[out++] - 128) * 128;
57 - } else {
58 - r = ((short*)data)[out/2];
59 - out += 2;
60 - }
61 + r = getOneSample();
62 l = l + r;
63 }
64 }