summaryrefslogtreecommitdiff
authorbipolar <bipolar>2002-02-01 18:29:21 (UTC)
committer bipolar <bipolar>2002-02-01 18:29:21 (UTC)
commit9a8990097aa35d28a9c758f730c5c8b5fa59560a (patch) (side-by-side diff)
treecc0bcc68d1090a0ae8b738f4223b5dc297bdc125
parent96f799b935cda52dfed323cadb9025ba1ae737df (diff)
downloadopie-9a8990097aa35d28a9c758f730c5c8b5fa59560a.zip
opie-9a8990097aa35d28a9c758f730c5c8b5fa59560a.tar.gz
opie-9a8990097aa35d28a9c758f730c5c8b5fa59560a.tar.bz2
Add patch for qte-232 for qsound fix for iPaq.
Diffstat (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 @@
+--- src/kernel/qsoundqss_qws.cpp.orig Wed Jan 30 12:49:24 2002
++++ src/kernel/qsoundqss_qws.cpp Wed Jan 30 12:47:41 2002
+@@ -142,6 +142,19 @@ public:
+ return wavedata_remaining < 0 || !max;
+ }
+ private:
++ int getOneSample()
++ {
++ int sample;
++ if ( chunkdata.wBitsPerSample == 8 ) {
++ sample = (data[out++] - 128) * 128;
++ wavedata_remaining--;
++ } else {
++ sample = ((short*)data)[out/2];
++ out += 2;
++ wavedata_remaining -= 2;
++ }
++ return sample;
++ }
+ void getSample(int& l, int& r)
+ {
+ l = r = 0;
+@@ -152,38 +165,22 @@ private:
+ if ( out >= max ) {
+ max = dev->readBlock((char*)data,
+ (uint)QMIN(sound_buffer_size,wavedata_remaining));
+- wavedata_remaining -= max;
+ out = 0;
+ if ( max <= 0 ) {
+ max = 0;
+ return;
+ }
+ }
+- if ( chunkdata.wBitsPerSample == 8 ) {
+- l = (data[out++] - 128) * 128;
+- } else {
+- l = ((short*)data)[out/2];
+- out += 2;
+- }
++ l = getOneSample();
+ if ( sound_stereo ) {
+ if ( chunkdata.channels == 1 ) {
+ r = l;
+ } else {
+- if ( chunkdata.wBitsPerSample == 8 ) {
+- r = (data[out++] - 128) * 128;
+- } else {
+- r = ((short*)data)[out/2];
+- out += 2;
+- }
++ r = getOneSample();
+ }
+ } else {
+ if ( chunkdata.channels == 2 ) {
+- if ( chunkdata.wBitsPerSample == 8 ) {
+- r = (data[out++] - 128) * 128;
+- } else {
+- r = ((short*)data)[out/2];
+- out += 2;
+- }
++ r = getOneSample();
+ l = l + r;
+ }
+ }