Mercurial > mplayer.hg
diff libao2/ao_dxr3.c @ 3201:039a973b3dda
Newest DXR3 patch (improved 1.0rc2) by David Holm.
author | atmos4 |
---|---|
date | Thu, 29 Nov 2001 17:31:58 +0000 |
parents | 1d4fb4d9aab5 |
children | 8ba06b63f873 |
line wrap: on
line diff
--- a/libao2/ao_dxr3.c Thu Nov 29 17:13:37 2001 +0000 +++ b/libao2/ao_dxr3.c Thu Nov 29 17:31:58 2001 +0000 @@ -146,6 +146,7 @@ static void audio_pause() { int ioval; + reset(); fd_control = open( "/dev/em8300", O_WRONLY ); if( fd_control < 0 ) printf( "AO: [dxr3] Oops, unable to pause playback\n" ); @@ -184,25 +185,28 @@ return ao_data.outburst; } space = ao_data.buffersize - space; + space /= ao_data.outburst; /* This is a smart way of doing a fast modulo reduction */ + space *= ao_data.outburst; /* fetched from ao_mpegpes.c */ return space; } static int play(void* data,int len,int flags) { if( ioctl( fd_audio, EM8300_IOCTL_AUDIO_SETPTS, &ao_data.pts ) < 0 ) - printf( "AO: [dxr3] Unable to set pts\n" ); + printf( "AO: [dxr3] Unable to set PTS\n" ); return write(fd_audio,data,len); } // return: how many unplayed bytes are in the buffer static float get_delay() { - int r=0; +/* int r=0; if( ioctl(fd_audio, SNDCTL_DSP_GETODELAY, &r) < 0 ) { printf( "AO: [dxr3] Unable to get unplayed bytes in buffer\n" ); return ((float)ao_data.buffersize)/(float)ao_data.bps; } - return (((float)r)/(float)ao_data.bps); + return (((float)r)/(float)ao_data.bps);*/ + return 0.0; }