summaryrefslogtreecommitdiffstats
path: root/libao2
diff options
context:
space:
mode:
authoratmos4 <atmos4@b3059339-0415-0410-9bf9-f77b7e298cf2>2001-11-29 17:31:58 +0000
committeratmos4 <atmos4@b3059339-0415-0410-9bf9-f77b7e298cf2>2001-11-29 17:31:58 +0000
commit98feb0179d79ae56ae9898b7be7db63f2913f93b (patch)
treee978259857a67dc32b0e937752e108bfc8319b73 /libao2
parentf1e6f33f26a53ce3541da8a922eb7308efb4f917 (diff)
downloadmpv-98feb0179d79ae56ae9898b7be7db63f2913f93b.tar.bz2
mpv-98feb0179d79ae56ae9898b7be7db63f2913f93b.tar.xz
Newest DXR3 patch (improved 1.0rc2) by David Holm.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@3202 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libao2')
-rw-r--r--libao2/ao_dxr3.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/libao2/ao_dxr3.c b/libao2/ao_dxr3.c
index 442e48382d..8aaa8355d9 100644
--- a/libao2/ao_dxr3.c
+++ b/libao2/ao_dxr3.c
@@ -146,6 +146,7 @@ static void reset()
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 @@ static int get_space()
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;
}