annotate src/sid/xs_sidplay2.cc @ 3168:7e58928783b3

alsa-ng: Set thread handles to NULL when threads exit.
author William Pitcock <nenolod@atheme.org>
date Fri, 15 May 2009 00:05:48 -0500
parents 45ef6d7c0174
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
1 /*
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
2 XMMS-SID - SIDPlay input plugin for X MultiMedia System (XMMS)
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
3
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
4 libSIDPlay v2 support
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
5
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
6 Programmed and designed by Matti 'ccr' Hamalainen <ccr@tnsp.org>
735
6c3c7b841382 [svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents: 463
diff changeset
7 (C) Copyright 1999-2007 Tecnic Software productions (TNSP)
0
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
8
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
9 This program is free software; you can redistribute it and/or modify
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
10 it under the terms of the GNU General Public License as published by
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
11 the Free Software Foundation; either version 2 of the License, or
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
12 (at your option) any later version.
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
13
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
14 This program is distributed in the hope that it will be useful,
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
17 GNU General Public License for more details.
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
18
735
6c3c7b841382 [svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents: 463
diff changeset
19 You should have received a copy of the GNU General Public License along
6c3c7b841382 [svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents: 463
diff changeset
20 with this program; if not, write to the Free Software Foundation, Inc.,
6c3c7b841382 [svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents: 463
diff changeset
21 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
0
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
22 */
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
23 #include "xmms-sid.h"
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
24
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
25 #ifdef HAVE_SIDPLAY2
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
26
735
6c3c7b841382 [svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents: 463
diff changeset
27 #include <stdio.h>
0
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
28 #include "xs_sidplay2.h"
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
29 #include "xs_config.h"
735
6c3c7b841382 [svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents: 463
diff changeset
30
0
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
31
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
32 #include <sidplay/sidplay2.h>
2623
02dbe40dd0c3 Synchronized CVS libsidplay2 COM interface support from XMMS-SID. This is
Matti Hamalainen <ccr@tnsp.org>
parents: 2509
diff changeset
33 #ifdef HAVE_SIDPLAY2_COMI
02dbe40dd0c3 Synchronized CVS libsidplay2 COM interface support from XMMS-SID. This is
Matti Hamalainen <ccr@tnsp.org>
parents: 2509
diff changeset
34 # include <sidplay/sidlazyiptr.h>
0
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
35 #endif
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
36
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
37
2623
02dbe40dd0c3 Synchronized CVS libsidplay2 COM interface support from XMMS-SID. This is
Matti Hamalainen <ccr@tnsp.org>
parents: 2509
diff changeset
38 class xs_sidplay2_t {
02dbe40dd0c3 Synchronized CVS libsidplay2 COM interface support from XMMS-SID. This is
Matti Hamalainen <ccr@tnsp.org>
parents: 2509
diff changeset
39 public:
02dbe40dd0c3 Synchronized CVS libsidplay2 COM interface support from XMMS-SID. This is
Matti Hamalainen <ccr@tnsp.org>
parents: 2509
diff changeset
40 #ifdef HAVE_SIDPLAY2_COMI
02dbe40dd0c3 Synchronized CVS libsidplay2 COM interface support from XMMS-SID. This is
Matti Hamalainen <ccr@tnsp.org>
parents: 2509
diff changeset
41 SidIPtr<ISidplay2> currEng;
02dbe40dd0c3 Synchronized CVS libsidplay2 COM interface support from XMMS-SID. This is
Matti Hamalainen <ccr@tnsp.org>
parents: 2509
diff changeset
42 SidLazyIPtr<ISidUnknown> currBuilder;
02dbe40dd0c3 Synchronized CVS libsidplay2 COM interface support from XMMS-SID. This is
Matti Hamalainen <ccr@tnsp.org>
parents: 2509
diff changeset
43 #else
2509
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
44 sidplay2 *currEng;
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
45 sidbuilder *currBuilder;
2623
02dbe40dd0c3 Synchronized CVS libsidplay2 COM interface support from XMMS-SID. This is
Matti Hamalainen <ccr@tnsp.org>
parents: 2509
diff changeset
46 #endif
2509
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
47 sid2_config_t currConfig;
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
48 SidTune *currTune;
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
49 guint8 *buf;
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
50 size_t bufSize;
2623
02dbe40dd0c3 Synchronized CVS libsidplay2 COM interface support from XMMS-SID. This is
Matti Hamalainen <ccr@tnsp.org>
parents: 2509
diff changeset
51
02dbe40dd0c3 Synchronized CVS libsidplay2 COM interface support from XMMS-SID. This is
Matti Hamalainen <ccr@tnsp.org>
parents: 2509
diff changeset
52 xs_sidplay2_t(void);
02dbe40dd0c3 Synchronized CVS libsidplay2 COM interface support from XMMS-SID. This is
Matti Hamalainen <ccr@tnsp.org>
parents: 2509
diff changeset
53 virtual ~xs_sidplay2_t(void) { ; }
02dbe40dd0c3 Synchronized CVS libsidplay2 COM interface support from XMMS-SID. This is
Matti Hamalainen <ccr@tnsp.org>
parents: 2509
diff changeset
54 };
02dbe40dd0c3 Synchronized CVS libsidplay2 COM interface support from XMMS-SID. This is
Matti Hamalainen <ccr@tnsp.org>
parents: 2509
diff changeset
55
02dbe40dd0c3 Synchronized CVS libsidplay2 COM interface support from XMMS-SID. This is
Matti Hamalainen <ccr@tnsp.org>
parents: 2509
diff changeset
56
02dbe40dd0c3 Synchronized CVS libsidplay2 COM interface support from XMMS-SID. This is
Matti Hamalainen <ccr@tnsp.org>
parents: 2509
diff changeset
57 #ifdef HAVE_RESID_BUILDER
02dbe40dd0c3 Synchronized CVS libsidplay2 COM interface support from XMMS-SID. This is
Matti Hamalainen <ccr@tnsp.org>
parents: 2509
diff changeset
58 # include <sidplay/builders/resid.h>
02dbe40dd0c3 Synchronized CVS libsidplay2 COM interface support from XMMS-SID. This is
Matti Hamalainen <ccr@tnsp.org>
parents: 2509
diff changeset
59 #endif
02dbe40dd0c3 Synchronized CVS libsidplay2 COM interface support from XMMS-SID. This is
Matti Hamalainen <ccr@tnsp.org>
parents: 2509
diff changeset
60 #ifdef HAVE_HARDSID_BUILDER
02dbe40dd0c3 Synchronized CVS libsidplay2 COM interface support from XMMS-SID. This is
Matti Hamalainen <ccr@tnsp.org>
parents: 2509
diff changeset
61 # include <sidplay/builders/hardsid.h>
02dbe40dd0c3 Synchronized CVS libsidplay2 COM interface support from XMMS-SID. This is
Matti Hamalainen <ccr@tnsp.org>
parents: 2509
diff changeset
62 #endif
02dbe40dd0c3 Synchronized CVS libsidplay2 COM interface support from XMMS-SID. This is
Matti Hamalainen <ccr@tnsp.org>
parents: 2509
diff changeset
63
02dbe40dd0c3 Synchronized CVS libsidplay2 COM interface support from XMMS-SID. This is
Matti Hamalainen <ccr@tnsp.org>
parents: 2509
diff changeset
64
02dbe40dd0c3 Synchronized CVS libsidplay2 COM interface support from XMMS-SID. This is
Matti Hamalainen <ccr@tnsp.org>
parents: 2509
diff changeset
65 xs_sidplay2_t::xs_sidplay2_t(void)
02dbe40dd0c3 Synchronized CVS libsidplay2 COM interface support from XMMS-SID. This is
Matti Hamalainen <ccr@tnsp.org>
parents: 2509
diff changeset
66 #ifdef HAVE_SIDPLAY2_COMI
02dbe40dd0c3 Synchronized CVS libsidplay2 COM interface support from XMMS-SID. This is
Matti Hamalainen <ccr@tnsp.org>
parents: 2509
diff changeset
67 :currEng(sidplay2::create())
02dbe40dd0c3 Synchronized CVS libsidplay2 COM interface support from XMMS-SID. This is
Matti Hamalainen <ccr@tnsp.org>
parents: 2509
diff changeset
68 #else
02dbe40dd0c3 Synchronized CVS libsidplay2 COM interface support from XMMS-SID. This is
Matti Hamalainen <ccr@tnsp.org>
parents: 2509
diff changeset
69 :currEng(NULL)
02dbe40dd0c3 Synchronized CVS libsidplay2 COM interface support from XMMS-SID. This is
Matti Hamalainen <ccr@tnsp.org>
parents: 2509
diff changeset
70 #endif
02dbe40dd0c3 Synchronized CVS libsidplay2 COM interface support from XMMS-SID. This is
Matti Hamalainen <ccr@tnsp.org>
parents: 2509
diff changeset
71 {
02dbe40dd0c3 Synchronized CVS libsidplay2 COM interface support from XMMS-SID. This is
Matti Hamalainen <ccr@tnsp.org>
parents: 2509
diff changeset
72 buf = NULL;
02dbe40dd0c3 Synchronized CVS libsidplay2 COM interface support from XMMS-SID. This is
Matti Hamalainen <ccr@tnsp.org>
parents: 2509
diff changeset
73 bufSize = 0;
02dbe40dd0c3 Synchronized CVS libsidplay2 COM interface support from XMMS-SID. This is
Matti Hamalainen <ccr@tnsp.org>
parents: 2509
diff changeset
74 currTune = NULL;
02dbe40dd0c3 Synchronized CVS libsidplay2 COM interface support from XMMS-SID. This is
Matti Hamalainen <ccr@tnsp.org>
parents: 2509
diff changeset
75 currBuilder = NULL;
02dbe40dd0c3 Synchronized CVS libsidplay2 COM interface support from XMMS-SID. This is
Matti Hamalainen <ccr@tnsp.org>
parents: 2509
diff changeset
76 }
0
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
77
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
78
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
79 /* We need to 'export' all this pseudo-C++ crap */
735
6c3c7b841382 [svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents: 463
diff changeset
80 extern "C" {
462
c488d191b528 [svn] - modified the sid plugin to use vfs, for both libsidplay v1 and v2; still requires testing and some work in the is_our_file part
giacomo
parents: 12
diff changeset
81
c488d191b528 [svn] - modified the sid plugin to use vfs, for both libsidplay v1 and v2; still requires testing and some work in the is_our_file part
giacomo
parents: 12
diff changeset
82
735
6c3c7b841382 [svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents: 463
diff changeset
83 /* Return song information
6c3c7b841382 [svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents: 463
diff changeset
84 */
2623
02dbe40dd0c3 Synchronized CVS libsidplay2 COM interface support from XMMS-SID. This is
Matti Hamalainen <ccr@tnsp.org>
parents: 2509
diff changeset
85 #define TFUNCTION xs_sidplay2_getinfo
02dbe40dd0c3 Synchronized CVS libsidplay2 COM interface support from XMMS-SID. This is
Matti Hamalainen <ccr@tnsp.org>
parents: 2509
diff changeset
86 #define TFUNCTION2 xs_sidplay2_updateinfo
02dbe40dd0c3 Synchronized CVS libsidplay2 COM interface support from XMMS-SID. This is
Matti Hamalainen <ccr@tnsp.org>
parents: 2509
diff changeset
87 #define TTUNEINFO SidTuneInfo
02dbe40dd0c3 Synchronized CVS libsidplay2 COM interface support from XMMS-SID. This is
Matti Hamalainen <ccr@tnsp.org>
parents: 2509
diff changeset
88 #define TTUNE SidTune
02dbe40dd0c3 Synchronized CVS libsidplay2 COM interface support from XMMS-SID. This is
Matti Hamalainen <ccr@tnsp.org>
parents: 2509
diff changeset
89 #define TENGINE xs_sidplay2_t
735
6c3c7b841382 [svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents: 463
diff changeset
90 #include "xs_sidplay.h"
462
c488d191b528 [svn] - modified the sid plugin to use vfs, for both libsidplay v1 and v2; still requires testing and some work in the is_our_file part
giacomo
parents: 12
diff changeset
91
0
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
92
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
93 /* Check if we can play the given file
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
94 */
2507
251336bee085 Cosmetic cleanups, synchronized from XMMS-SID.
Matti Hamalainen <ccr@tnsp.org>
parents: 2478
diff changeset
95 gboolean xs_sidplay2_probe(xs_file_t *f)
0
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
96 {
2643
45ef6d7c0174 Synchronized typedef name changes from XMMS-SID.
Matti Hamalainen <ccr@tnsp.org>
parents: 2623
diff changeset
97 gchar tmpBuf[5];
2509
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
98
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
99 if (!f) return FALSE;
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
100
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
101 if (xs_fread(tmpBuf, sizeof(gchar), 4, f) != 4)
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
102 return FALSE;
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
103
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
104 if (!strncmp(tmpBuf, "PSID", 4) || !strncmp(tmpBuf, "RSID", 4))
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
105 return TRUE;
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
106 else
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
107 return FALSE;
463
1e5cb7a00cb0 [svn] - added is_our_file_from_vfs function to sid, for both libsidplay v1 and v2
giacomo
parents: 462
diff changeset
108 }
1e5cb7a00cb0 [svn] - added is_our_file_from_vfs function to sid, for both libsidplay v1 and v2
giacomo
parents: 462
diff changeset
109
0
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
110
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
111 /* Initialize SIDPlay2
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
112 */
2507
251336bee085 Cosmetic cleanups, synchronized from XMMS-SID.
Matti Hamalainen <ccr@tnsp.org>
parents: 2478
diff changeset
113 gboolean xs_sidplay2_init(xs_status_t * myStatus)
0
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
114 {
2509
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
115 gint tmpFreq, i;
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
116 xs_sidplay2_t *myEngine;
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
117 sid_filter_t tmpFilter;
2643
45ef6d7c0174 Synchronized typedef name changes from XMMS-SID.
Matti Hamalainen <ccr@tnsp.org>
parents: 2623
diff changeset
118 xs_sid2_filter_t *f;
2509
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
119 assert(myStatus);
0
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
120
2509
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
121 /* Allocate internal structures */
2623
02dbe40dd0c3 Synchronized CVS libsidplay2 COM interface support from XMMS-SID. This is
Matti Hamalainen <ccr@tnsp.org>
parents: 2509
diff changeset
122 myEngine = new xs_sidplay2_t();
2509
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
123 myStatus->sidEngine = myEngine;
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
124 if (!myEngine) return FALSE;
0
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
125
2509
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
126 /* Initialize the engine */
2623
02dbe40dd0c3 Synchronized CVS libsidplay2 COM interface support from XMMS-SID. This is
Matti Hamalainen <ccr@tnsp.org>
parents: 2509
diff changeset
127 #ifndef HAVE_SIDPLAY2_COMI
2509
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
128 myEngine->currEng = new sidplay2;
2623
02dbe40dd0c3 Synchronized CVS libsidplay2 COM interface support from XMMS-SID. This is
Matti Hamalainen <ccr@tnsp.org>
parents: 2509
diff changeset
129 #endif
2509
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
130 if (!myEngine->currEng) {
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
131 xs_error("[SIDPlay2] Could not initialize emulation engine.\n");
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
132 return FALSE;
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
133 }
0
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
134
2509
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
135 /* Get current configuration */
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
136 myEngine->currConfig = myEngine->currEng->config();
0
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
137
2509
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
138 /* Configure channels and stuff */
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
139 switch (myStatus->audioChannels) {
0
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
140
2509
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
141 case XS_CHN_AUTOPAN:
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
142 myEngine->currConfig.playback = sid2_stereo;
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
143 break;
0
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
144
2509
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
145 case XS_CHN_STEREO:
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
146 myEngine->currConfig.playback = sid2_stereo;
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
147 break;
0
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
148
2509
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
149 case XS_CHN_MONO:
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
150 default:
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
151 myEngine->currConfig.playback = sid2_mono;
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
152 myStatus->audioChannels = XS_CHN_MONO;
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
153 break;
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
154 }
0
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
155
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
156
2509
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
157 /* Memory mode settings */
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
158 switch (xs_cfg.memoryMode) {
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
159 case XS_MPU_BANK_SWITCHING:
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
160 myEngine->currConfig.environment = sid2_envBS;
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
161 break;
0
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
162
2509
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
163 case XS_MPU_TRANSPARENT_ROM:
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
164 myEngine->currConfig.environment = sid2_envTP;
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
165 break;
0
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
166
2509
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
167 case XS_MPU_PLAYSID_ENVIRONMENT:
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
168 myEngine->currConfig.environment = sid2_envPS;
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
169 break;
0
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
170
2509
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
171 case XS_MPU_REAL:
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
172 default:
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
173 myEngine->currConfig.environment = sid2_envR;
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
174 xs_cfg.memoryMode = XS_MPU_REAL;
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
175 break;
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
176 }
0
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
177
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
178
2509
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
179 /* Audio parameters sanity checking and setup */
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
180 myEngine->currConfig.precision = myStatus->audioBitsPerSample;
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
181 tmpFreq = myStatus->audioFrequency;
0
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
182
2509
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
183 if (myStatus->oversampleEnable)
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
184 tmpFreq = (tmpFreq * myStatus->oversampleFactor);
0
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
185
2509
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
186 myEngine->currConfig.frequency = tmpFreq;
0
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
187
2509
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
188 switch (myStatus->audioBitsPerSample) {
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
189 case XS_RES_8BIT:
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
190 myStatus->audioFormat = FMT_U8;
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
191 myEngine->currConfig.sampleFormat = SID2_LITTLE_UNSIGNED;
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
192 break;
0
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
193
2509
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
194 case XS_RES_16BIT:
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
195 default:
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
196 switch (myStatus->audioFormat) {
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
197 case FMT_U16_LE:
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
198 myEngine->currConfig.sampleFormat = SID2_LITTLE_UNSIGNED;
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
199 break;
0
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
200
2509
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
201 case FMT_U16_BE:
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
202 myEngine->currConfig.sampleFormat = SID2_BIG_UNSIGNED;
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
203 break;
0
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
204
2509
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
205 case FMT_U16_NE:
2475
a5f1c47cee0c Use Glib endianess macros.
Matti Hamalainen <ccr@tnsp.org>
parents: 1553
diff changeset
206 #if G_BYTE_ORDER == G_BIG_ENDIAN
2509
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
207 myEngine->currConfig.sampleFormat = SID2_BIG_UNSIGNED;
0
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
208 #else
2475
a5f1c47cee0c Use Glib endianess macros.
Matti Hamalainen <ccr@tnsp.org>
parents: 1553
diff changeset
209 #if G_BYTE_ORDER == G_LITTLE_ENDIAN
2509
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
210 myEngine->currConfig.sampleFormat = SID2_LITTLE_UNSIGNED;
2475
a5f1c47cee0c Use Glib endianess macros.
Matti Hamalainen <ccr@tnsp.org>
parents: 1553
diff changeset
211 #else
a5f1c47cee0c Use Glib endianess macros.
Matti Hamalainen <ccr@tnsp.org>
parents: 1553
diff changeset
212 #error Unsupported endianess!
a5f1c47cee0c Use Glib endianess macros.
Matti Hamalainen <ccr@tnsp.org>
parents: 1553
diff changeset
213 #endif
0
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
214 #endif
2509
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
215 break;
0
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
216
2509
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
217 case FMT_S16_LE:
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
218 myEngine->currConfig.sampleFormat = SID2_LITTLE_SIGNED;
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
219 break;
0
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
220
2509
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
221 case FMT_S16_BE:
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
222 myEngine->currConfig.sampleFormat = SID2_BIG_SIGNED;
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
223 break;
0
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
224
2509
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
225 default:
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
226 myStatus->audioFormat = FMT_S16_NE;
2475
a5f1c47cee0c Use Glib endianess macros.
Matti Hamalainen <ccr@tnsp.org>
parents: 1553
diff changeset
227 #if G_BYTE_ORDER == G_BIG_ENDIAN
2509
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
228 myEngine->currConfig.sampleFormat = SID2_BIG_SIGNED;
0
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
229 #else
2475
a5f1c47cee0c Use Glib endianess macros.
Matti Hamalainen <ccr@tnsp.org>
parents: 1553
diff changeset
230 #if G_BYTE_ORDER == G_LITTLE_ENDIAN
2509
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
231 myEngine->currConfig.sampleFormat = SID2_LITTLE_SIGNED;
2475
a5f1c47cee0c Use Glib endianess macros.
Matti Hamalainen <ccr@tnsp.org>
parents: 1553
diff changeset
232 #else
a5f1c47cee0c Use Glib endianess macros.
Matti Hamalainen <ccr@tnsp.org>
parents: 1553
diff changeset
233 #error Unsupported endianess!
a5f1c47cee0c Use Glib endianess macros.
Matti Hamalainen <ccr@tnsp.org>
parents: 1553
diff changeset
234 #endif
0
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
235 #endif
2509
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
236 break;
0
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
237
2509
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
238 }
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
239 break;
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
240 }
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
241
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
242 /* Convert filter */
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
243 f = &(xs_cfg.sid2Filter);
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
244 XSDEBUG("using filter '%s', %d points\n", f->name, f->npoints);
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
245 if (f->npoints > XS_SIDPLAY2_NFPOINTS) {
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
246 xs_error("[SIDPlay2] Invalid number of filter curve points (%d > %d)\n",
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
247 f->npoints, XS_SIDPLAY2_NFPOINTS);
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
248 f->npoints = XS_SIDPLAY2_NFPOINTS;
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
249 }
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
250
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
251 tmpFilter.points = f->npoints;
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
252 for (i = 0; i < f->npoints; i++) {
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
253 tmpFilter.cutoff[i][0] = f->points[i].x;
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
254 tmpFilter.cutoff[i][1] = f->points[i].y;
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
255 }
0
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
256
2509
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
257 /* Initialize builder object */
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
258 XSDEBUG("init builder #%i, maxsids=%i\n", xs_cfg.sid2Builder, (myEngine->currEng->info()).maxsids);
0
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
259 #ifdef HAVE_RESID_BUILDER
2509
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
260 if (xs_cfg.sid2Builder == XS_BLD_RESID) {
2623
02dbe40dd0c3 Synchronized CVS libsidplay2 COM interface support from XMMS-SID. This is
Matti Hamalainen <ccr@tnsp.org>
parents: 2509
diff changeset
261 #ifdef HAVE_SIDPLAY2_COMI
02dbe40dd0c3 Synchronized CVS libsidplay2 COM interface support from XMMS-SID. This is
Matti Hamalainen <ccr@tnsp.org>
parents: 2509
diff changeset
262 myEngine->currBuilder = ReSIDBuilderCreate("");
02dbe40dd0c3 Synchronized CVS libsidplay2 COM interface support from XMMS-SID. This is
Matti Hamalainen <ccr@tnsp.org>
parents: 2509
diff changeset
263 SidLazyIPtr<IReSIDBuilder> rs(myEngine->currBuilder);
02dbe40dd0c3 Synchronized CVS libsidplay2 COM interface support from XMMS-SID. This is
Matti Hamalainen <ccr@tnsp.org>
parents: 2509
diff changeset
264 if (rs) {
02dbe40dd0c3 Synchronized CVS libsidplay2 COM interface support from XMMS-SID. This is
Matti Hamalainen <ccr@tnsp.org>
parents: 2509
diff changeset
265 myEngine->currConfig.sidEmulation = rs->iaggregate();
02dbe40dd0c3 Synchronized CVS libsidplay2 COM interface support from XMMS-SID. This is
Matti Hamalainen <ccr@tnsp.org>
parents: 2509
diff changeset
266 #else
2509
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
267 ReSIDBuilder *rs = new ReSIDBuilder("ReSID builder");
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
268 myEngine->currBuilder = (sidbuilder *) rs;
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
269 if (rs) {
2623
02dbe40dd0c3 Synchronized CVS libsidplay2 COM interface support from XMMS-SID. This is
Matti Hamalainen <ccr@tnsp.org>
parents: 2509
diff changeset
270 #endif
2509
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
271 /* Builder object created, initialize it */
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
272 rs->create((myEngine->currEng->info()).maxsids);
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
273 if (!*rs) {
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
274 xs_error("reSID->create() failed.\n");
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
275 return FALSE;
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
276 }
0
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
277
2509
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
278 rs->filter(xs_cfg.emulateFilters);
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
279 if (!*rs) {
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
280 xs_error("reSID->filter(%d) failed.\n", xs_cfg.emulateFilters);
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
281 return FALSE;
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
282 }
0
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
283
2643
45ef6d7c0174 Synchronized typedef name changes from XMMS-SID.
Matti Hamalainen <ccr@tnsp.org>
parents: 2623
diff changeset
284 #ifndef HAVE_SIDPLAY2_DISTORTION
2509
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
285 // FIXME FIX ME: support other configurable parameters ...
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
286 // ... WHEN/IF resid-builder+libsidplay2 gets fixed
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
287 rs->sampling(tmpFreq);
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
288 if (!*rs) {
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
289 xs_error("reSID->sampling(%d) failed.\n", tmpFreq);
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
290 return FALSE;
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
291 }
2643
45ef6d7c0174 Synchronized typedef name changes from XMMS-SID.
Matti Hamalainen <ccr@tnsp.org>
parents: 2623
diff changeset
292 #endif
2509
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
293
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
294 if (tmpFilter.points > 0)
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
295 rs->filter((sid_filter_t *) &tmpFilter);
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
296 else
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
297 rs->filter((sid_filter_t *) NULL);
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
298
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
299 if (!*rs) {
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
300 xs_error("reSID->filter(NULL) failed.\n");
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
301 return FALSE;
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
302 }
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
303 }
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
304 }
0
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
305 #endif
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
306 #ifdef HAVE_HARDSID_BUILDER
2509
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
307 if (xs_cfg.sid2Builder == XS_BLD_HARDSID) {
2623
02dbe40dd0c3 Synchronized CVS libsidplay2 COM interface support from XMMS-SID. This is
Matti Hamalainen <ccr@tnsp.org>
parents: 2509
diff changeset
308 #ifdef HAVE_SIDPLAY2_COMI
02dbe40dd0c3 Synchronized CVS libsidplay2 COM interface support from XMMS-SID. This is
Matti Hamalainen <ccr@tnsp.org>
parents: 2509
diff changeset
309 myEngine->currBuilder = HardSIDBuilderCreate("");
02dbe40dd0c3 Synchronized CVS libsidplay2 COM interface support from XMMS-SID. This is
Matti Hamalainen <ccr@tnsp.org>
parents: 2509
diff changeset
310 SidLazyIPtr<IHardSIDBuilder> hs(myEngine->currBuilder);
02dbe40dd0c3 Synchronized CVS libsidplay2 COM interface support from XMMS-SID. This is
Matti Hamalainen <ccr@tnsp.org>
parents: 2509
diff changeset
311 if (hs) {
02dbe40dd0c3 Synchronized CVS libsidplay2 COM interface support from XMMS-SID. This is
Matti Hamalainen <ccr@tnsp.org>
parents: 2509
diff changeset
312 myEngine->currConfig.sidEmulation = hs->iaggregate();
02dbe40dd0c3 Synchronized CVS libsidplay2 COM interface support from XMMS-SID. This is
Matti Hamalainen <ccr@tnsp.org>
parents: 2509
diff changeset
313 #else
2509
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
314 HardSIDBuilder *hs = new HardSIDBuilder("HardSID builder");
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
315 myEngine->currBuilder = (sidbuilder *) hs;
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
316 if (hs) {
2623
02dbe40dd0c3 Synchronized CVS libsidplay2 COM interface support from XMMS-SID. This is
Matti Hamalainen <ccr@tnsp.org>
parents: 2509
diff changeset
317 #endif
2509
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
318 /* Builder object created, initialize it */
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
319 hs->create((myEngine->currEng->info()).maxsids);
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
320 if (!*hs) {
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
321 xs_error("hardSID->create() failed.\n");
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
322 return FALSE;
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
323 }
0
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
324
2509
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
325 hs->filter(xs_cfg.emulateFilters);
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
326 if (!*hs) {
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
327 xs_error("hardSID->filter(%d) failed.\n", xs_cfg.emulateFilters);
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
328 return FALSE;
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
329 }
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
330 }
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
331 }
0
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
332 #endif
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
333
2509
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
334 if (!myEngine->currBuilder) {
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
335 xs_error("[SIDPlay2] Could not initialize SIDBuilder object.\n");
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
336 return FALSE;
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
337 }
0
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
338
2623
02dbe40dd0c3 Synchronized CVS libsidplay2 COM interface support from XMMS-SID. This is
Matti Hamalainen <ccr@tnsp.org>
parents: 2509
diff changeset
339 #ifndef HAVE_SIDPLAY2_COMI
02dbe40dd0c3 Synchronized CVS libsidplay2 COM interface support from XMMS-SID. This is
Matti Hamalainen <ccr@tnsp.org>
parents: 2509
diff changeset
340 myEngine->currConfig.sidEmulation = myEngine->currBuilder;
2509
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
341 XSDEBUG("%s\n", myEngine->currBuilder->credits());
2623
02dbe40dd0c3 Synchronized CVS libsidplay2 COM interface support from XMMS-SID. This is
Matti Hamalainen <ccr@tnsp.org>
parents: 2509
diff changeset
342 #endif
0
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
343
2509
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
344 /* Clockspeed settings */
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
345 switch (xs_cfg.clockSpeed) {
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
346 case XS_CLOCK_NTSC:
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
347 myEngine->currConfig.clockDefault = SID2_CLOCK_NTSC;
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
348 break;
0
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
349
2509
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
350 default:
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
351 xs_error("[SIDPlay2] Invalid clockSpeed=%d, falling back to PAL.\n",
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
352 xs_cfg.clockSpeed);
735
6c3c7b841382 [svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents: 463
diff changeset
353
2509
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
354 case XS_CLOCK_PAL:
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
355 myEngine->currConfig.clockDefault = SID2_CLOCK_PAL;
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
356 xs_cfg.clockSpeed = XS_CLOCK_PAL;
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
357 break;
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
358 }
0
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
359
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
360
2509
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
361 /* Configure rest of the emulation */
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
362
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
363 if (xs_cfg.forceSpeed) {
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
364 myEngine->currConfig.clockForced = true;
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
365 myEngine->currConfig.clockSpeed = myEngine->currConfig.clockDefault;
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
366 } else {
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
367 myEngine->currConfig.clockForced = false;
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
368 myEngine->currConfig.clockSpeed = SID2_CLOCK_CORRECT;
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
369 }
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
370
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
371 if ((xs_cfg.sid2OptLevel >= 0) && (xs_cfg.sid2OptLevel <= SID2_MAX_OPTIMISATION))
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
372 myEngine->currConfig.optimisation = xs_cfg.sid2OptLevel;
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
373 else {
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
374 xs_error("Invalid sid2OptLevel=%d, falling back to %d.\n",
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
375 xs_cfg.sid2OptLevel, SID2_DEFAULT_OPTIMISATION);
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
376
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
377 xs_cfg.sid2OptLevel =
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
378 myEngine->currConfig.optimisation = SID2_DEFAULT_OPTIMISATION;
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
379 }
0
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
380
2509
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
381 if (xs_cfg.mos8580)
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
382 myEngine->currConfig.sidDefault = SID2_MOS8580;
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
383 else
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
384 myEngine->currConfig.sidDefault = SID2_MOS6581;
0
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
385
2509
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
386 if (xs_cfg.forceModel)
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
387 myEngine->currConfig.sidModel = myEngine->currConfig.sidDefault;
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
388 else
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
389 myEngine->currConfig.sidModel = SID2_MODEL_CORRECT;
0
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
390
2509
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
391
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
392 /* XXX: Should this be configurable? libSIDPlay1 does not support it, though */
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
393 myEngine->currConfig.sidSamples = TRUE;
0
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
394
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
395
2509
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
396 /* Now set the emulator configuration */
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
397 if (myEngine->currEng->config(myEngine->currConfig) < 0) {
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
398 xs_error("[SIDPlay2] Emulator engine configuration failed!\n");
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
399 return FALSE;
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
400 }
0
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
401
2509
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
402 /* Create the sidtune */
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
403 myEngine->currTune = new SidTune(0);
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
404 if (!myEngine->currTune) {
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
405 xs_error("[SIDPlay2] Could not initialize SIDTune object.\n");
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
406 return FALSE;
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
407 }
0
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
408
2509
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
409 return TRUE;
0
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
410 }
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
411
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
412
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
413 /* Close SIDPlay2 engine
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
414 */
2507
251336bee085 Cosmetic cleanups, synchronized from XMMS-SID.
Matti Hamalainen <ccr@tnsp.org>
parents: 2478
diff changeset
415 void xs_sidplay2_close(xs_status_t * myStatus)
0
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
416 {
2509
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
417 xs_sidplay2_t *myEngine;
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
418 assert(myStatus);
0
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
419
2509
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
420 myEngine = (xs_sidplay2_t *) myStatus->sidEngine;
0
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
421
2509
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
422 /* Free internals */
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
423 if (myEngine->currBuilder) {
2623
02dbe40dd0c3 Synchronized CVS libsidplay2 COM interface support from XMMS-SID. This is
Matti Hamalainen <ccr@tnsp.org>
parents: 2509
diff changeset
424 #ifndef HAVE_SIDPLAY2_COMI
2509
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
425 delete myEngine->currBuilder;
2623
02dbe40dd0c3 Synchronized CVS libsidplay2 COM interface support from XMMS-SID. This is
Matti Hamalainen <ccr@tnsp.org>
parents: 2509
diff changeset
426 #endif
2509
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
427 myEngine->currBuilder = NULL;
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
428 }
0
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
429
2623
02dbe40dd0c3 Synchronized CVS libsidplay2 COM interface support from XMMS-SID. This is
Matti Hamalainen <ccr@tnsp.org>
parents: 2509
diff changeset
430 #ifndef HAVE_SIDPLAY2_COMI
2509
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
431 if (myEngine->currEng) {
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
432 delete myEngine->currEng;
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
433 myEngine->currEng = NULL;
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
434 }
2623
02dbe40dd0c3 Synchronized CVS libsidplay2 COM interface support from XMMS-SID. This is
Matti Hamalainen <ccr@tnsp.org>
parents: 2509
diff changeset
435 #endif
0
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
436
2509
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
437 if (myEngine->currTune) {
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
438 delete myEngine->currTune;
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
439 myEngine->currTune = NULL;
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
440 }
0
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
441
2509
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
442 xs_sidplay2_delete(myStatus);
0
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
443
2623
02dbe40dd0c3 Synchronized CVS libsidplay2 COM interface support from XMMS-SID. This is
Matti Hamalainen <ccr@tnsp.org>
parents: 2509
diff changeset
444 delete myEngine;
2509
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
445 myStatus->sidEngine = NULL;
0
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
446 }
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
447
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
448
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
449 /* Initialize current song and sub-tune
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
450 */
2507
251336bee085 Cosmetic cleanups, synchronized from XMMS-SID.
Matti Hamalainen <ccr@tnsp.org>
parents: 2478
diff changeset
451 gboolean xs_sidplay2_initsong(xs_status_t * myStatus)
0
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
452 {
2509
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
453 xs_sidplay2_t *myEngine;
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
454 assert(myStatus);
0
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
455
2509
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
456 myEngine = (xs_sidplay2_t *) myStatus->sidEngine;
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
457 if (!myEngine) return FALSE;
0
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
458
2509
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
459 if (!myEngine->currTune->selectSong(myStatus->currSong)) {
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
460 xs_error("[SIDPlay2] currTune->selectSong() failed\n");
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
461 return FALSE;
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
462 }
0
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
463
2509
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
464 if (myEngine->currEng->load(myEngine->currTune) < 0) {
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
465 xs_error("[SIDPlay2] currEng->load() failed\n");
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
466 return FALSE;
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
467 }
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
468
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
469 myStatus->isInitialized = TRUE;
0
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
470
2509
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
471 return TRUE;
0
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
472 }
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
473
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
474
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
475 /* Emulate and render audio data to given buffer
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
476 */
2507
251336bee085 Cosmetic cleanups, synchronized from XMMS-SID.
Matti Hamalainen <ccr@tnsp.org>
parents: 2478
diff changeset
477 guint xs_sidplay2_fillbuffer(xs_status_t * myStatus, gchar * audioBuffer, guint audioBufSize)
0
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
478 {
2509
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
479 xs_sidplay2_t *myEngine;
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
480 assert(myStatus);
0
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
481
2509
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
482 myEngine = (xs_sidplay2_t *) myStatus->sidEngine;
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
483 if (!myEngine) return 0;
0
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
484
2509
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
485 return myEngine->currEng->play(audioBuffer, audioBufSize);
0
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
486 }
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
487
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
488
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
489 /* Load a given SID-tune file
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
490 */
2507
251336bee085 Cosmetic cleanups, synchronized from XMMS-SID.
Matti Hamalainen <ccr@tnsp.org>
parents: 2478
diff changeset
491 gboolean xs_sidplay2_load(xs_status_t * myStatus, gchar * pcFilename)
0
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
492 {
2509
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
493 xs_sidplay2_t *myEngine;
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
494 assert(myStatus);
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
495 myStatus->isInitialized = FALSE;
0
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
496
2509
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
497 myEngine = (xs_sidplay2_t *) myStatus->sidEngine;
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
498 if (!myEngine) return FALSE;
0
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
499
2509
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
500 /* Try to get the tune */
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
501 if (!pcFilename) return FALSE;
0
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
502
2509
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
503 if (xs_fload_buffer(pcFilename, &(myEngine->buf), &(myEngine->bufSize)) != 0)
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
504 return FALSE;
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
505
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
506 if (!myEngine->currTune->read(myEngine->buf, myEngine->bufSize))
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
507 return FALSE;
0
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
508
2509
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
509 return TRUE;
0
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
510 }
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
511
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
512
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
513 /* Delete INTERNAL information
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
514 */
2507
251336bee085 Cosmetic cleanups, synchronized from XMMS-SID.
Matti Hamalainen <ccr@tnsp.org>
parents: 2478
diff changeset
515 void xs_sidplay2_delete(xs_status_t * myStatus)
0
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
516 {
2509
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
517 xs_sidplay2_t *myEngine;
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
518 assert(myStatus);
0
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
519
2509
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
520 myEngine = (xs_sidplay2_t *) myStatus->sidEngine;
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
521 if (!myEngine) return;
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
522
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
523 g_free(myEngine->buf);
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
524 myEngine->buf = NULL;
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
525 myEngine->bufSize = 0;
0
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
526 }
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
527
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
528
735
6c3c7b841382 [svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents: 463
diff changeset
529 /* Hardware backend flushing
0
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
530 */
2507
251336bee085 Cosmetic cleanups, synchronized from XMMS-SID.
Matti Hamalainen <ccr@tnsp.org>
parents: 2478
diff changeset
531 void xs_sidplay2_flush(xs_status_t * myStatus)
735
6c3c7b841382 [svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents: 463
diff changeset
532 {
2509
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
533 assert(myStatus);
0
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
534
735
6c3c7b841382 [svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents: 463
diff changeset
535 #ifdef HAVE_HARDSID_BUILDER
6c3c7b841382 [svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents: 463
diff changeset
536 #ifdef HSID_SID2_COM
2509
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
537 IfPtr<HardSIDBuilder> hs(myStatus->currBuilder);
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
538 if (hs)
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
539 hs->flush();
735
6c3c7b841382 [svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents: 463
diff changeset
540 #else
2509
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
541 if (xs_cfg.sid2Builder == XS_BLD_HARDSID)
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
542 ((HardSIDBuilder *) myStatus->currBuilder)->flush();
735
6c3c7b841382 [svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents: 463
diff changeset
543 #endif
6c3c7b841382 [svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents: 463
diff changeset
544 #endif
6c3c7b841382 [svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents: 463
diff changeset
545 }
6c3c7b841382 [svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents: 463
diff changeset
546
6c3c7b841382 [svn] - sync audacious-sid with latest xmms-sid, from Matti Hamalainen (ccr).
nenolod
parents: 463
diff changeset
547
2509
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
548 } /* extern "C" */
1223e8510d8a Change tabs to 4 spaces, everywhere.
Matti Hamalainen <ccr@tnsp.org>
parents: 2507
diff changeset
549 #endif /* HAVE_SIDPLAY2 */