summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--libopie2/opiemm/oimagezoomer.cpp2
-rw-r--r--libopie2/opiemm/osoundsystem.cpp8
2 files changed, 6 insertions, 4 deletions
diff --git a/libopie2/opiemm/oimagezoomer.cpp b/libopie2/opiemm/oimagezoomer.cpp
index d1eec67..b7ef238 100644
--- a/libopie2/opiemm/oimagezoomer.cpp
+++ b/libopie2/opiemm/oimagezoomer.cpp
@@ -189,25 +189,25 @@ void OImageZoomer::drawContents( QPainter* p ) {
189 int x = (c.width()*m_visPt.x())/len + c.x(); 189 int x = (c.width()*m_visPt.x())/len + c.x();
190 int w = (c.width()*m_visSize.width() )/len + c.x(); 190 int w = (c.width()*m_visSize.width() )/len + c.x();
191 if ( w > c.width() ) w = c.width(); 191 if ( w > c.width() ) w = c.width();
192 192
193 len = m_imgSize.height(); 193 len = m_imgSize.height();
194 int y = (c.height()*m_visPt.y() )/len + c.y(); 194 int y = (c.height()*m_visPt.y() )/len + c.y();
195 int h = (c.height()*m_visSize.height() )/len + c.y(); 195 int h = (c.height()*m_visSize.height() )/len + c.y();
196 if ( h > c.height() ) h = c.height(); 196 if ( h > c.height() ) h = c.height();
197 197
198 p->drawRect( x, y, w, h ); 198 p->drawRect( x, y, w, h );
199} 199}
200 200
201void OImageZoomer::mousePressEvent( QMouseEvent*ev) { 201void OImageZoomer::mousePressEvent( QMouseEvent*) {
202 m_mouseX = m_mouseY = -1; 202 m_mouseX = m_mouseY = -1;
203 m_mevent = true; 203 m_mevent = true;
204} 204}
205 205
206void OImageZoomer::mouseReleaseEvent( QMouseEvent*ev) { 206void OImageZoomer::mouseReleaseEvent( QMouseEvent*ev) {
207 if (!m_mevent) return; 207 if (!m_mevent) return;
208 int mx, my; 208 int mx, my;
209 mx = ev->x(); 209 mx = ev->x();
210 my = ev->y(); 210 my = ev->y();
211 int diffx = (mx) * m_imgSize.width() / width(); 211 int diffx = (mx) * m_imgSize.width() / width();
212 int diffy = (my) * m_imgSize.height() / height(); 212 int diffy = (my) * m_imgSize.height() / height();
213 emit zoomArea(diffx,diffy); 213 emit zoomArea(diffx,diffy);
diff --git a/libopie2/opiemm/osoundsystem.cpp b/libopie2/opiemm/osoundsystem.cpp
index 2b17230..763ff65 100644
--- a/libopie2/opiemm/osoundsystem.cpp
+++ b/libopie2/opiemm/osoundsystem.cpp
@@ -73,25 +73,25 @@ void OSoundSystem::synchronize()
73 if ( !hasFile ) 73 if ( !hasFile )
74 { 74 {
75 odebug << "OSoundSystem: /dev/sound not existing. No sound devices available" << oendl; 75 odebug << "OSoundSystem: /dev/sound not existing. No sound devices available" << oendl;
76 return; 76 return;
77 } 77 }
78 QTextStream s( &f ); 78 QTextStream s( &f );
79 s.readLine(); 79 s.readLine();
80 s.readLine(); 80 s.readLine();
81 while ( !s.atEnd() ) 81 while ( !s.atEnd() )
82 { 82 {
83 s >> str; 83 s >> str;
84 str.truncate( str.find( ':' ) ); 84 str.truncate( str.find( ':' ) );
85 odebug << "OSoundSystem: found interface '" << str << "'" << oendl; 85 odebug << "OSoundSystem: found interface '" << str << "'" << oendl;
86 OAudioInterface* iface; 86 OAudioInterface* iface;
87 iface = new OAudioInterface( this, (const char*) str ); 87 iface = new OAudioInterface( this, (const char*) str );
88 88
89 _interfaces.insert( str, iface ); 89 _interfaces.insert( str, iface );
90 s.readLine(); 90 s.readLine();
91 } 91 }
92*/ 92*/
93} 93}
94 94
95 95
96int OSoundSystem::count() const 96int OSoundSystem::count() const
97{ 97{
@@ -228,52 +228,54 @@ void OMixerInterface::init()
228 if ( devmask & ( 1 << SOUND_MIXER_CD ) ) _channels.insert( "RecCD", SOUND_MIXER_CD ); 228 if ( devmask & ( 1 << SOUND_MIXER_CD ) ) _channels.insert( "RecCD", SOUND_MIXER_CD );
229 if ( devmask & ( 1 << SOUND_MIXER_IMIX ) ) _channels.insert( "RecInputMix", SOUND_MIXER_IMIX ); 229 if ( devmask & ( 1 << SOUND_MIXER_IMIX ) ) _channels.insert( "RecInputMix", SOUND_MIXER_IMIX );
230 if ( devmask & ( 1 << SOUND_MIXER_ALTPCM ) ) _channels.insert( "RecAltPCM", SOUND_MIXER_ALTPCM ); 230 if ( devmask & ( 1 << SOUND_MIXER_ALTPCM ) ) _channels.insert( "RecAltPCM", SOUND_MIXER_ALTPCM );
231 if ( devmask & ( 1 << SOUND_MIXER_RECLEV ) ) _channels.insert( "RecRecord", SOUND_MIXER_RECLEV ); 231 if ( devmask & ( 1 << SOUND_MIXER_RECLEV ) ) _channels.insert( "RecRecord", SOUND_MIXER_RECLEV );
232 if ( devmask & ( 1 << SOUND_MIXER_IGAIN ) ) _channels.insert( "RecInputGain", SOUND_MIXER_IGAIN ); 232 if ( devmask & ( 1 << SOUND_MIXER_IGAIN ) ) _channels.insert( "RecInputGain", SOUND_MIXER_IGAIN );
233 if ( devmask & ( 1 << SOUND_MIXER_OGAIN ) ) _channels.insert( "RecOutputGain", SOUND_MIXER_OGAIN ); 233 if ( devmask & ( 1 << SOUND_MIXER_OGAIN ) ) _channels.insert( "RecOutputGain", SOUND_MIXER_OGAIN );
234 //odebug << "recmask available and constructed." << oendl; 234 //odebug << "recmask available and constructed." << oendl;
235 } 235 }
236 236
237/* ChannelIterator it; 237/* ChannelIterator it;
238 for ( it = _channels.begin(); it != _channels.end(); ++it ) 238 for ( it = _channels.begin(); it != _channels.end(); ++it )
239 { 239 {
240 odebug << "Channel " << it.key() << " available (bit " << it.data() << ")" << oendl; 240 odebug << "Channel " << it.key() << " available (bit " << it.data() << ")" << oendl;
241 odebug << " +--- Volume: " << volume( it.key() ) & 0xff << " | " << volume( it.key() ) >> 8 << "" << oendl; 241 odebug << " +--- Volume: " << volume( it.key() ) & 0xff << " | " << volume( it.key() ) >> 8 << "" << oendl;
242 } 242 }
243*/ 243*/
244} 244}
245 245
246QStringList OMixerInterface::allChannels() const 246QStringList OMixerInterface::allChannels() const
247{ 247{
248 ChannelIterator it = _channels.begin(); 248 ChannelIterator it = _channels.begin();
249 QStringList channels; 249 QStringList channels;
250 while ( it != _channels.end() ) 250 while ( it != _channels.end() )
251 { 251 {
252 channels += it.key(); 252 channels += it.key();
253 it++; 253 it++;
254 } 254 }
255 return channels; 255 return channels;
256} 256}
257 257
258 258
259QStringList OMixerInterface::recChannels() const 259QStringList OMixerInterface::recChannels() const
260{ 260{
261 owarn << "NYI" << oendl; 261 owarn << "NYI" << oendl;
262 return QStringList();
262} 263}
263 264
264 265
265QStringList OMixerInterface::playChannels() const 266QStringList OMixerInterface::playChannels() const
266{ 267{
267 owarn << "NYI" << oendl; 268 owarn << "NYI" << oendl;
269 return QStringList();
268} 270}
269 271
270 272
271bool OMixerInterface::hasChannel( const QString& channel ) 273bool OMixerInterface::hasChannel( const QString& channel )
272{ 274{
273 return _channels.contains( channel ); 275 return _channels.contains( channel );
274} 276}
275 277
276 278
277void OMixerInterface::setVolume( const QString& channel, int left, int right ) 279void OMixerInterface::setVolume( const QString& channel, int left, int right )
278{ 280{
279 int volume = left; 281 int volume = left;