Mercurial > repos > blastem
comparison ym2612.c @ 859:46bb673eed4e
Load config file and rom.db from appropriate locations on Android
author | Michael Pavone <pavone@retrodev.com> |
---|---|
date | Wed, 04 Nov 2015 22:48:27 -0800 |
parents | 2d474efb4629 |
children | 252dfd29831d |
comparison
equal
deleted
inserted
replaced
858:ba19bcc00483 | 859:46bb673eed4e |
---|---|
115 void ym_adjust_master_clock(ym2612_context * context, uint32_t master_clock) | 115 void ym_adjust_master_clock(ym2612_context * context, uint32_t master_clock) |
116 { | 116 { |
117 uint64_t old_inc = context->buffer_inc; | 117 uint64_t old_inc = context->buffer_inc; |
118 context->buffer_inc = ((BUFFER_INC_RES * (uint64_t)context->sample_rate) / (uint64_t)master_clock) * (uint64_t)context->clock_inc; | 118 context->buffer_inc = ((BUFFER_INC_RES * (uint64_t)context->sample_rate) / (uint64_t)master_clock) * (uint64_t)context->clock_inc; |
119 } | 119 } |
120 | |
121 #ifdef __ANDROID__ | |
122 #define log2(x) (log(x)/log(2)) | |
123 #endif | |
120 | 124 |
121 void ym_init(ym2612_context * context, uint32_t sample_rate, uint32_t master_clock, uint32_t clock_div, uint32_t sample_limit, uint32_t options) | 125 void ym_init(ym2612_context * context, uint32_t sample_rate, uint32_t master_clock, uint32_t clock_div, uint32_t sample_limit, uint32_t options) |
122 { | 126 { |
123 dfopen(debug_file, "ym_debug.txt", "w"); | 127 dfopen(debug_file, "ym_debug.txt", "w"); |
124 memset(context, 0, sizeof(*context)); | 128 memset(context, 0, sizeof(*context)); |