4c83c92084
Audio works with akode, at least. This needs the new taglib, hence the basic citrus stuff.
40 lines
1.3 KiB
Plaintext
40 lines
1.3 KiB
Plaintext
$OpenBSD: patch-amarok_src_engine_enginebase_cpp,v 1.1.1.1 2005/04/15 06:42:39 espie Exp $
|
|
--- amarok/src/engine/enginebase.cpp.orig Thu Apr 14 23:50:29 2005
|
|
+++ amarok/src/engine/enginebase.cpp Thu Apr 14 23:53:36 2005
|
|
@@ -7,7 +7,9 @@
|
|
#include <fcntl.h>
|
|
#include <math.h>
|
|
#include <sys/ioctl.h>
|
|
+#if !defined(__OpenBSD__)
|
|
#include <sys/soundcard.h>
|
|
+#endif
|
|
#include <sys/wait.h>
|
|
#include <unistd.h>
|
|
|
|
@@ -54,6 +56,7 @@ Engine::Base::setHardwareMixer( bool use
|
|
|
|
if ( m_mixer >= 0 )
|
|
{
|
|
+#if !defined(__OpenBSD__)
|
|
int devmask, recmask, i_recsrc, stereodevs;
|
|
if ( ioctl( m_mixer, SOUND_MIXER_READ_DEVMASK, &devmask ) == -1 ) goto failure;
|
|
if ( ioctl( m_mixer, SOUND_MIXER_READ_RECMASK, &recmask ) == -1 ) goto failure;
|
|
@@ -61,6 +64,7 @@ Engine::Base::setHardwareMixer( bool use
|
|
if ( ioctl( m_mixer, SOUND_MIXER_READ_STEREODEVS, &stereodevs ) == -1 ) goto failure;
|
|
if ( !devmask ) goto failure;
|
|
|
|
+#endif
|
|
setVolumeSW( 100 ); //seems sensible
|
|
|
|
return true;
|
|
@@ -101,7 +105,9 @@ Engine::Base::setVolumeHW( uint percent
|
|
if ( isMixerHW() )
|
|
{
|
|
percent = percent + ( percent << 8 );
|
|
+#if !defined(__OpenBSD__)
|
|
ioctl( m_mixer, MIXER_WRITE( 4 ), &percent );
|
|
+#endif
|
|
}
|
|
}
|
|
|