1 //Copyright: (C) 2003 Mark Kretschmann
2 // (C) 2004,2005 Max Howell, <max.howell@methylblue.com>
5 #include "enginebase.h"
13 , m_xfadeNextTrack( false )
15 , m_scope( SCOPESIZE
)
24 //////////////////////////////////////////////////////////////////////
28 Engine::Base::load( const KUrl
&url
, bool stream
)
37 void Engine::Base::setVolume( uint value
)
41 setVolumeSW( makeVolumeLogarithmic( value
) );
46 Engine::Base::makeVolumeLogarithmic( uint volume
) // static
48 // We're using a logarithmic function to make the volume ramp more natural.
49 return static_cast<uint
>( 100 - 100.0 * std::log10( ( 100 - volume
) * 0.09 + 1.0 ) );
53 #include "enginebase.moc"