From 0dfd43e7b10da2476afeaa1cbc18491a361224f7 Mon Sep 17 00:00:00 2001 From: n-a-c-h <> Date: Sun, 26 Feb 2006 03:20:23 +0000 Subject: [PATCH] Raw Video and PCM audio files now selectable. --- zsnes/src/md.psr | 4 ++++ zsnes/src/zmovie.c | 12 ++++++------ 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/zsnes/src/md.psr b/zsnes/src/md.psr index acb898bd..2b2c7aee 100644 --- a/zsnes/src/md.psr +++ b/zsnes/src/md.psr @@ -1,9 +1,13 @@ +md_raw_file times 50 db "rawvideo.bin" @ Only for Raw Video +md_pcm_audio times 50 db "pcmaudio.wav" @ AVI dumping always dumps audio seperatly + md_ntsc times 20 db "59649/995" md_pal times 5 db "50/1" md_prog times 50 db "mencoder" md_raw times 100 db "-demuxer rawvideo -rawvideo format=0x42475218:w=256:h=224:size=172032" md_other times 50 db "-aspect 4/3 -mc 0 -nosound" md_file times 50 db "video.avi" + @Valid variables to use in the next three lines are: @$md_prog, $md_raw, $md_other, $md_file, $md_video_rate @These variables are defined above. diff --git a/zsnes/src/zmovie.c b/zsnes/src/zmovie.c index 4f996b53..99c11cef 100644 --- a/zsnes/src/zmovie.c +++ b/zsnes/src/zmovie.c @@ -1892,8 +1892,6 @@ static char *pick_var(char **str) FILE *open_movie_file() { char command[450], *p, *var; - read_movie_vars("zmovie.cfg"); - *command = 0; switch (MovieVideoMode) @@ -1985,12 +1983,14 @@ static void raw_video_close() } } -static bool raw_video_open(const char *video_filename, const char *audio_filename) +static bool raw_video_open() { + read_movie_vars("zmovie.cfg"); + switch (MovieVideoMode) { case 1: - raw_vid.vp = fopen(video_filename, "wb"); + raw_vid.vp = fopen(md_raw_file, "wb"); break; case 2: case 3: case 4: @@ -2009,7 +2009,7 @@ static bool raw_video_open(const char *video_filename, const char *audio_filenam if (!MovieVideoMode || raw_vid.vp) { - if ((raw_vid.ap = fopen(audio_filename, "wb"))) + if ((raw_vid.ap = fopen(md_pcm_audio, "wb"))) { if ((raw_vid.sample_buffer = (unsigned short *)malloc(RAW_BUFFER_SAMPLES*sizeof(short)))) { @@ -2684,7 +2684,7 @@ void MovieDumpRaw() case MOVIE_OFF: MoviePlay(); SRAMChdir(); - RawDumpInProgress = raw_video_open("rawvideo.bin", "pcmaudio.wav"); + RawDumpInProgress = raw_video_open(); asm_call(ChangetoLOADdir); break; }