summaryrefslogtreecommitdiffstats
path: root/libao2/ao_pcm.c
diff options
context:
space:
mode:
authorreimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2006-04-14 13:18:35 +0000
committerreimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2006-04-14 13:18:35 +0000
commit86b087112712cb82f5c0d1dc929da642927459b5 (patch)
tree0a9328708cb4e7c01d592cbdb1b213d99a667dba /libao2/ao_pcm.c
parent3a1d78bc7a5d5ce7cf01edf678dc87eda54e0ccb (diff)
downloadmpv-86b087112712cb82f5c0d1dc929da642927459b5.tar.bz2
mpv-86b087112712cb82f5c0d1dc929da642927459b5.tar.xz
-ao pcm:fast suboption for faster-than-realtime dumping
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@18093 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libao2/ao_pcm.c')
-rw-r--r--libao2/ao_pcm.c4
1 files changed, 3 insertions, 1 deletions
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;
}