summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--library/opie-base.control2
-rw-r--r--library/qpeapplication.cpp29
-rw-r--r--library/qpeapplication.h6
3 files changed, 36 insertions, 1 deletions
diff --git a/library/opie-base.control b/library/opie-base.control
index f883268..e610b8b 100644
--- a/library/opie-base.control
+++ b/library/opie-base.control
@@ -5,3 +5,3 @@ Maintainer: Warwick Allison <warwick@trolltech.com>
5Architecture: arm 5Architecture: arm
6Version: $QPE_VERSION-$SUB_VERSION 6Version: $QPE_VERSION-$SUB_VERSION.1
7Depends: qt-embedded (>=$QTE_VERSION), opie-qcop, opie-taskbar, opie-pics, opie-sounds, apmd 7Depends: qt-embedded (>=$QTE_VERSION), opie-qcop, opie-taskbar, opie-pics, opie-sounds, apmd
diff --git a/library/qpeapplication.cpp b/library/qpeapplication.cpp
index 4dbfbd8..a55f5f9 100644
--- a/library/qpeapplication.cpp
+++ b/library/qpeapplication.cpp
@@ -165,2 +165,3 @@ public:
165static int muted=0; 165static int muted=0;
166static int micMuted=0;
166 167
@@ -186,2 +187,21 @@ static void setVolume(int t=0, int percent=-1)
186 187
188static void setMic(int t=0, int percent=-1)
189{
190 switch (t) {
191 case 0: {
192 Config cfg("Sound");
193 cfg.setGroup("System");
194 if ( percent < 0 )
195 percent = cfg.readNumEntry("Mic",50);
196
197 int fd = 0;
198 int mic = micMuted ? 0 : percent;
199 if ((fd = open("/dev/mixer", O_RDWR))>=0) {
200 ioctl(fd, MIXER_WRITE(SOUND_MIXER_MIC), &mic);
201 ::close(fd);
202 }
203 } break;
204 }
205}
206
187int qpe_sysBrightnessSteps() 207int qpe_sysBrightnessSteps()
@@ -988,2 +1008,11 @@ void QPEApplication::systemMessage( const QCString &msg, const QByteArray &data)
988 emit volumeChanged( muted ); 1008 emit volumeChanged( muted );
1009 } else if ( msg == "setMic(int,int)") { // Added: 2002-02-08 by Jeremy Cowgar <jc@cowgar.com>
1010 int t,v;
1011 stream >> t >> v;
1012 setMic(t,v);
1013 emit micChanged( micMuted );
1014 } else if ( msg == "micChange(bool)" ) { // Added: 2002-02-08 by Jeremy Cowgar <jc@cowgar.com>
1015 stream >> micMuted;
1016 setMic();
1017 emit micChanged( micMuted );
989 } else if ( msg == "setScreenSaverMode(int)" ) { 1018 } else if ( msg == "setScreenSaverMode(int)" ) {
diff --git a/library/qpeapplication.h b/library/qpeapplication.h
index fd5e57d..23606db 100644
--- a/library/qpeapplication.h
+++ b/library/qpeapplication.h
@@ -87,2 +87,3 @@ signals:
87 void volumeChanged( bool muted ); 87 void volumeChanged( bool muted );
88 void micChanged( bool muted );
88 void appMessage( const QCString& msg, const QByteArray& data); 89 void appMessage( const QCString& msg, const QByteArray& data);
@@ -119,2 +120,7 @@ private:
119 QPEApplicationData *d; 120 QPEApplicationData *d;
121
122 bool reserved_sh;
123
124
125
120}; 126};