Mercurial > hg > xmms-sid
comparison src/xs_sidplay2.cc @ 773:45108b3d88db
Add resid-fp and resid backend to sidplay2fp support.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Tue, 06 Nov 2012 11:56:00 +0200 |
parents | 72e58ecb1a2c |
children | d09d5c852b7e |
comparison
equal
deleted
inserted
replaced
772:91a36a4b79c6 | 773:45108b3d88db |
---|---|
67 | 67 |
68 | 68 |
69 #ifdef HAVE_RESID_BUILDER | 69 #ifdef HAVE_RESID_BUILDER |
70 # ifdef HAVE_SIDPLAY2_FP | 70 # ifdef HAVE_SIDPLAY2_FP |
71 # include <sidplayfp/builders/residfp.h> | 71 # include <sidplayfp/builders/residfp.h> |
72 # include <sidplayfp/builders/resid.h> | |
72 # else | 73 # else |
73 # include <sidplay/builders/resid.h> | 74 # include <sidplay/builders/resid.h> |
74 # endif | 75 # endif |
75 #endif | 76 #endif |
76 | 77 |
263 XSDEBUG("init builder #%i, maxsids=%i\n", xs_cfg.sid2Builder, (engine->emu.info()).maxsids); | 264 XSDEBUG("init builder #%i, maxsids=%i\n", xs_cfg.sid2Builder, (engine->emu.info()).maxsids); |
264 | 265 |
265 switch (xs_cfg.sid2Builder) | 266 switch (xs_cfg.sid2Builder) |
266 { | 267 { |
267 #ifdef HAVE_RESID_BUILDER | 268 #ifdef HAVE_RESID_BUILDER |
269 #ifdef HAVE_SIDPLAY2_FP | |
268 case XS_BLD_RESID: | 270 case XS_BLD_RESID: |
269 #ifdef HAVE_SIDPLAY2_FP | 271 { |
272 ReSIDBuilder *rs = new ReSIDBuilder("ReSID builder"); | |
273 if (rs) | |
274 { | |
275 engine->config.sidEmulation = rs; | |
276 if (!*rs) return FALSE; | |
277 rs->create((engine->emu.info()).maxsids); | |
278 if (!*rs) return FALSE; | |
279 rs->bias(0.0f); | |
280 } | |
281 } | |
282 break; | |
283 | |
284 case XS_BLD_RESID_FP: | |
270 { | 285 { |
271 ReSIDfpBuilder *rs = new ReSIDfpBuilder("ReSID builder FP!"); | 286 ReSIDfpBuilder *rs = new ReSIDfpBuilder("ReSID builder FP!"); |
272 if (rs) | 287 if (rs) |
273 { | 288 { |
274 engine->config.sidEmulation = rs; | 289 engine->config.sidEmulation = rs; |
281 rs->filter6581Curve(m_filter.filterCurve6581); | 296 rs->filter6581Curve(m_filter.filterCurve6581); |
282 if (m_filter.filterCurve8580) | 297 if (m_filter.filterCurve8580) |
283 rs->filter8580Curve((double)m_filter.filterCurve8580); | 298 rs->filter8580Curve((double)m_filter.filterCurve8580); |
284 */ | 299 */ |
285 } | 300 } |
301 } | |
302 break; | |
286 #else | 303 #else |
304 case XS_BLD_RESID: | |
305 { | |
287 engine->config.sidEmulation = ReSIDBuilderCreate("ReSID builder"); | 306 engine->config.sidEmulation = ReSIDBuilderCreate("ReSID builder"); |
288 SidLazyIPtr<IReSIDBuilder> rs(engine->config.sidEmulation); | 307 SidLazyIPtr<IReSIDBuilder> rs(engine->config.sidEmulation); |
289 if (rs) | 308 if (rs) |
290 { | 309 { |
291 engine->config.sidEmulation = rs->iaggregate(); | 310 engine->config.sidEmulation = rs->iaggregate(); |
292 rs->create((engine->emu.info()).maxsids); | 311 rs->create((engine->emu.info()).maxsids); |
293 if (!*rs) return FALSE; | 312 if (!*rs) return FALSE; |
294 } | 313 } |
295 #endif | |
296 } | 314 } |
297 break; | 315 break; |
316 #endif | |
298 #endif | 317 #endif |
299 | 318 |
300 #ifdef HAVE_HARDSID_BUILDER | 319 #ifdef HAVE_HARDSID_BUILDER |
301 case XS_BLD_HARDSID: | 320 case XS_BLD_HARDSID: |
302 #ifdef HAVE_SIDPLAY2_FP | 321 #ifdef HAVE_SIDPLAY2_FP |