comparison vgmplay.c @ 1692:5dacaef602a7 segacd

Merge from default
author Michael Pavone <pavone@retrodev.com>
date Sat, 05 Jan 2019 00:58:08 -0800
parents 0174759e559f
children c9695252eff4
comparison
equal deleted inserted replaced
1504:95b3a1a8b26c 1692:5dacaef602a7
60 60
61 void handle_mouseup(int mouse, int button) 61 void handle_mouseup(int mouse, int button)
62 { 62 {
63 } 63 }
64 64
65 void controller_add_mappings()
66 {
67 }
68
65 int headless = 0; 69 int headless = 0;
66 70
67 #define CYCLE_LIMIT MCLKS_NTSC/60 71 #define CYCLE_LIMIT MCLKS_NTSC/60
68 #define MAX_SOUND_CYCLES 100000 72 #define MAX_SOUND_CYCLES 100000
69 tern_node * config; 73 tern_node * config;
106 110
107 char * lowpass_cutoff_str = tern_find_path(config, "audio\0lowpass_cutoff\0", TVAL_PTR).ptrval; 111 char * lowpass_cutoff_str = tern_find_path(config, "audio\0lowpass_cutoff\0", TVAL_PTR).ptrval;
108 uint32_t lowpass_cutoff = lowpass_cutoff_str ? atoi(lowpass_cutoff_str) : 3390; 112 uint32_t lowpass_cutoff = lowpass_cutoff_str ? atoi(lowpass_cutoff_str) : 3390;
109 113
110 ym2612_context y_context; 114 ym2612_context y_context;
111 ym_init(&y_context, render_sample_rate(), MCLKS_NTSC, MCLKS_PER_YM, render_audio_buffer(), opts, lowpass_cutoff); 115 ym_init(&y_context, MCLKS_NTSC, MCLKS_PER_YM, opts);
112 116
113 psg_context p_context; 117 psg_context p_context;
114 psg_init(&p_context, render_sample_rate(), MCLKS_NTSC, MCLKS_PER_PSG, render_audio_buffer(), lowpass_cutoff); 118 psg_init(&p_context, MCLKS_NTSC, MCLKS_PER_PSG);
115 119
116 FILE * f = fopen(argv[1], "rb"); 120 FILE * f = fopen(argv[1], "rb");
117 vgm_header header; 121 vgm_header header;
118 fread(&header, sizeof(header), 1, f); 122 fread(&header, sizeof(header), 1, f);
119 if (header.version < 0x150 || !header.data_offset) { 123 if (header.version < 0x150 || !header.data_offset) {