[Mplayer-users] libxmm compilation patch
Oskar Liljeblad
osk at hem.passagen.se
Fri Apr 20 10:09:51 CEST 2001
I had to apply the patch below to be able to compile mplayer
with libxmm of xmmp... (But it crashes when started, so I have
to investigate further.)
Oskar (osk at hem.passagen.se)
-------------- next part --------------
--- mplayer.c Fri Apr 20 00:39:53 2001
+++ mplayer.new.c Fri Apr 20 10:07:42 2001
@@ -65,6 +65,7 @@
#include "libxmm/libxmm.h"
XMM xmm;
XMM_PluginSound *pSound=NULL;
+XMM_SoundFormat sndformat;
#endif
extern int vo_screenwidth;
@@ -1199,8 +1200,10 @@
xmm.cSound = (XMM_PluginSound *)xmm_PluginRegister( XMMP_AUDIO_DRIVER );
if( xmm.cSound ){
pSound = xmm.cSound->Init( &xmm );
- if( pSound && pSound->Start( pSound, sh_audio->samplerate, sh_audio->channels,
- ( sh_audio->samplesize == 2 ) ? XMM_SOUND_FMT_S16LE : XMM_SOUND_FMT_U8 )){
+ sndformat.samprate = sh_audio->samplerate;
+ sndformat.channels = sh_audio->channels;
+ sndformat.format = ( sh_audio->samplesize == 2 ) ? XMM_SOUND_FMT_S16LE : XMM_SOUND_FMT_U8;
+ if( pSound && pSound->Start( pSound, &sndformat )){
printf("XMM: audio setup ok\n");
} else {
has_audio=0;
@@ -1219,7 +1222,7 @@
#ifdef USE_XMMP_AUDIO
if(audio_buffer_size==-1){
// Measuring buffer size:
- buffer_delay=pSound->QueryDelay(pSound, 0);
+ buffer_delay = pSound->Control(pSound, XMM_CTLGET_DELAY, 0);
} else {
// -abs commandline option
buffer_delay=audio_buffer_size/(float)(sh_audio->o_bps);
More information about the MPlayer-users
mailing list