From dfb5ea9cf695c24d24e451da24d384dd69634d43 Mon Sep 17 00:00:00 2001 From: Michael Pavone Date: Sun, 1 May 2016 13:36:14 -0700 Subject: Made low pass filter frequency configurable --- vgmplay.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'vgmplay.c') diff --git a/vgmplay.c b/vgmplay.c index e889f1e..f1b401e 100644 --- a/vgmplay.c +++ b/vgmplay.c @@ -95,12 +95,15 @@ int main(int argc, char ** argv) if (argc >= 3 && !strcmp(argv[2], "-y")) { opts |= YM_OPT_WAVE_LOG; } + + char * lowpass_cutoff_str = tern_find_path(config, "audio\0lowpass_cutoff\0").ptrval; + uint32_t lowpass_cutoff = lowpass_cutoff_str ? atoi(lowpass_cutoff_str) : 3390; ym2612_context y_context; - ym_init(&y_context, render_sample_rate(), MCLKS_NTSC, MCLKS_PER_YM, render_audio_buffer(), opts); + ym_init(&y_context, render_sample_rate(), MCLKS_NTSC, MCLKS_PER_YM, render_audio_buffer(), opts, lowpass_cutoff); psg_context p_context; - psg_init(&p_context, render_sample_rate(), MCLKS_NTSC, MCLKS_PER_PSG, render_audio_buffer()); + psg_init(&p_context, render_sample_rate(), MCLKS_NTSC, MCLKS_PER_PSG, render_audio_buffer(), lowpass_cutoff); FILE * f = fopen(argv[1], "rb"); vgm_header header; -- cgit v1.2.3