From 86b087112712cb82f5c0d1dc929da642927459b5 Mon Sep 17 00:00:00 2001 From: reimar Date: Fri, 14 Apr 2006 13:18:35 +0000 Subject: -ao pcm:fast suboption for faster-than-realtime dumping git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@18093 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libao2/ao_pcm.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'libao2') diff --git a/libao2/ao_pcm.c b/libao2/ao_pcm.c index f6455bdb89..36acf5e703 100644 --- a/libao2/ao_pcm.c +++ b/libao2/ao_pcm.c @@ -27,6 +27,7 @@ extern int vo_pts; static char *ao_outputfilename = NULL; static int ao_pcm_waveheader = 1; +static int fast = 0; #define WAV_ID_RIFF 0x46464952 /* "RIFF" */ #define WAV_ID_WAVE 0x45564157 /* "WAVE" */ @@ -83,6 +84,7 @@ static int init(int rate,int channels,int format,int flags){ opt_t subopts[] = { {"waveheader", OPT_ARG_BOOL, &ao_pcm_waveheader, NULL}, {"file", OPT_ARG_MSTRZ, &ao_outputfilename, NULL}, + {"fast", OPT_ARG_BOOL, &fast, NULL}, {NULL} }; // set defaults @@ -179,7 +181,7 @@ static void audio_resume(void) static int get_space(void){ if(vo_pts) - return ao_data.pts < vo_pts ? ao_data.outburst : 0; + return ao_data.pts < vo_pts + fast * 30000 ? ao_data.outburst : 0; return ao_data.outburst; } -- cgit v1.2.3