updated on Wed Jan 11 00:07:16 UTC 2012
[aur-mirror.git] / legasynth / gcc4.patch
blob5a3c743e8ba8b36328f4631ac05ff3157dea4595
1 diff -Narup legasynth-0.4.1/effects/chorus.h legasynth-0.4.1.new/effects/chorus.h
2 --- legasynth-0.4.1/effects/chorus.h 2002-07-18 00:42:01.000000000 +0200
3 +++ legasynth-0.4.1.new/effects/chorus.h 2007-11-11 23:16:31.000000000 +0100
4 @@ -38,7 +38,7 @@ class Chorus {
5 int index; //osc index
6 int ring_buffer_index;
8 - vector<Sint32> ringbuffer;
9 + std::vector<Sint32> ringbuffer;
11 int mixfreq;
13 diff -Narup legasynth-0.4.1/engines/dx7/dx7_bank_load.cpp legasynth-0.4.1.new/engines/dx7/dx7_bank_load.cpp
14 --- legasynth-0.4.1/engines/dx7/dx7_bank_load.cpp 2002-07-07 03:06:33.000000000 +0200
15 +++ legasynth-0.4.1.new/engines/dx7/dx7_bank_load.cpp 2007-11-11 23:38:34.000000000 +0100
16 @@ -17,7 +17,7 @@
18 #include "dx7_bank.h"
20 -bool Dx7_Bank::load_file(string p_file, int p_offset=0) {
21 +bool Dx7_Bank::load_file(string p_file, int p_offset) {
24 FILE *in;
25 @@ -132,4 +132,4 @@ bool Dx7_Bank::load_file(string p_file,
26 fclose(in);
28 return false;
30 \ No newline at end of file
32 diff -Narup legasynth-0.4.1/engines/dx7/dx7_tables.h legasynth-0.4.1.new/engines/dx7/dx7_tables.h
33 --- legasynth-0.4.1/engines/dx7/dx7_tables.h 2002-07-10 01:30:40.000000000 +0200
34 +++ legasynth-0.4.1.new/engines/dx7/dx7_tables.h 2007-11-11 23:36:59.000000000 +0100
35 @@ -35,8 +35,8 @@ public:
36 static float EG_rate_rise_percent[128];
37 static float EG_rate_decay_percent[128];
39 - static float Dx7_Tables::EG_level_to_peak[128]; // for modulatoros
40 - static float Dx7_Tables::EG_amp_to_peak[128]; //for carriers
41 + static float EG_level_to_peak[128]; // for modulatoros
42 + static float EG_amp_to_peak[128]; //for carriers
43 static Sint32 carrier_modifier[100];
44 static Sint32 modulator_modifier[100];
46 diff -Narup legasynth-0.4.1/engines/sid/sid_bank.cpp legasynth-0.4.1.new/engines/sid/sid_bank.cpp
47 --- legasynth-0.4.1/engines/sid/sid_bank.cpp 2002-08-17 03:48:12.000000000 +0200
48 +++ legasynth-0.4.1.new/engines/sid/sid_bank.cpp 2007-11-11 23:39:17.000000000 +0100
49 @@ -42,7 +42,7 @@ void SID_Bank::set_patch_name(int p_inde
50 patch_name[p_index]=p_name;
53 -bool SID_Bank::load_file(string p_file, int p_offset=0) {
54 +bool SID_Bank::load_file(string p_file, int p_offset) {
56 return true;
58 diff -Narup legasynth-0.4.1/engines/ym2xxx/ym2x_bank.h legasynth-0.4.1.new/engines/ym2xxx/ym2x_bank.h
59 --- legasynth-0.4.1/engines/ym2xxx/ym2x_bank.h 2002-07-20 04:44:16.000000000 +0200
60 +++ legasynth-0.4.1.new/engines/ym2xxx/ym2x_bank.h 2007-11-11 23:40:33.000000000 +0100
61 @@ -40,7 +40,7 @@ public:
63 string get_patch_name(int p_index);
64 void set_patch_name(int p_index,string p_name);
65 - bool load_file(string p_file, int p_offset=0);
66 + bool load_file(string p_file, int p_offset);
67 bool load_patch(string p_file, int p_index);
70 diff -Narup legasynth-0.4.1/gui/interface.h legasynth-0.4.1.new/gui/interface.h
71 --- legasynth-0.4.1/gui/interface.h 2002-07-20 23:30:19.000000000 +0200
72 +++ legasynth-0.4.1.new/gui/interface.h 2007-11-12 10:17:03.000000000 +0100
73 @@ -62,7 +62,7 @@
75 class Interface : public Gtk::Window {
77 - static const char* Interface::notes[128];
78 + static const char* notes[128];
80 Gtk::Tree bank_tree;
81 Gtk::Table *table7;
82 diff -Narup legasynth-0.4.1/gui/interface_widget_optionselect.h legasynth-0.4.1.new/gui/interface_widget_optionselect.h
83 --- legasynth-0.4.1/gui/interface_widget_optionselect.h 2002-07-20 08:07:53.000000000 +0200
84 +++ legasynth-0.4.1.new/gui/interface_widget_optionselect.h 2007-11-12 10:22:13.000000000 +0100
85 @@ -22,6 +22,8 @@
86 #include <gtk--/menu.h>
87 #include <gtk--/menuitem.h>
88 #include <vector>
89 +using std::vector;
90 +using std::string;
91 /**
92 *@author red
94 diff -Narup legasynth-0.4.1/gui/interface_widget_voice_preview.h legasynth-0.4.1.new/gui/interface_widget_voice_preview.h
95 --- legasynth-0.4.1/gui/interface_widget_voice_preview.h 2002-07-19 01:40:06.000000000 +0200
96 +++ legasynth-0.4.1.new/gui/interface_widget_voice_preview.h 2007-11-12 10:47:00.000000000 +0100
97 @@ -26,6 +26,7 @@
98 #include <vector>
99 #include "typedefs.h"
100 #include "voice.h"
101 +using std::vector;
103 *@author red
105 diff -Narup legasynth-0.4.1/gui/popups.h legasynth-0.4.1.new/gui/popups.h
106 --- legasynth-0.4.1/gui/popups.h 2002-07-10 01:32:39.000000000 +0200
107 +++ legasynth-0.4.1.new/gui/popups.h 2007-11-12 10:16:19.000000000 +0100
108 @@ -32,6 +32,9 @@
109 #include "typedefs.h"
110 #include <string>
111 #include <vector>
113 +using namespace std;
116 *@author CODENIX
118 diff -Narup legasynth-0.4.1/lib/bank.cpp legasynth-0.4.1.new/lib/bank.cpp
119 --- legasynth-0.4.1/lib/bank.cpp 2002-07-26 03:45:18.000000000 +0200
120 +++ legasynth-0.4.1.new/lib/bank.cpp 2007-11-11 23:18:30.000000000 +0100
121 @@ -268,8 +268,8 @@ int Bank::get_patch_default_controller_i
125 -bool Bank::load_file(string p_file, int p_offset=0) {}
126 -bool Bank::load_patch(string p_file, int p_index=0) {}
127 +bool Bank::load_file(string p_file, int p_offset) {}
128 +bool Bank::load_patch(string p_file, int p_index) {}
131 int Bank::get_patch_default_controller(int p_patch,int p_ctrl) {
132 diff -Narup legasynth-0.4.1/lib/midi_event.h legasynth-0.4.1.new/lib/midi_event.h
133 --- legasynth-0.4.1/lib/midi_event.h 2002-08-17 01:24:39.000000000 +0200
134 +++ legasynth-0.4.1.new/lib/midi_event.h 2007-11-11 23:32:18.000000000 +0100
135 @@ -23,7 +23,19 @@
136 #include "mixer.h"
137 #include "device_manager.h"
138 #include <vector>
139 -#include <hash_map>
140 +#include <ext/hash_map>
141 +namespace __gnu_cxx
143 + template<> struct hash< std::string >
145 + size_t operator()( const std::string& x ) const
147 + return hash< const char* >()( x.c_str() );
149 + };
151 +using namespace std;
152 +using namespace __gnu_cxx;
154 *@author Juan Linietsky
156 diff -Narup legasynth-0.4.1/lib/mixer.h legasynth-0.4.1.new/lib/mixer.h
157 --- legasynth-0.4.1/lib/mixer.h 2002-07-21 04:04:46.000000000 +0200
158 +++ legasynth-0.4.1.new/lib/mixer.h 2007-11-11 23:22:05.000000000 +0100
159 @@ -17,6 +17,7 @@
161 #ifndef MIXER_H
162 #define MIXER_H
163 +using namespace std;
165 #include "revmodel.h"
167 diff -Narup legasynth-0.4.1/lib/property.cpp legasynth-0.4.1.new/lib/property.cpp
168 --- legasynth-0.4.1/lib/property.cpp 2002-07-20 18:20:51.000000000 +0200
169 +++ legasynth-0.4.1.new/lib/property.cpp 2007-11-11 23:35:54.000000000 +0100
170 @@ -21,8 +21,7 @@
172 void append_int_to_vector(int p_val,vector<Uint8> &p_data) {
174 - Uint32* valref;
175 - (int*)valref=&p_val;
176 + int* valref=&p_val;
177 p_data.push_back(*valref&0xFF);
178 *valref>>=8;
179 p_data.push_back(*valref&0xFF);
180 diff -Narup legasynth-0.4.1/lib/property.h legasynth-0.4.1.new/lib/property.h
181 --- legasynth-0.4.1/lib/property.h 2002-07-20 08:56:57.000000000 +0200
182 +++ legasynth-0.4.1.new/lib/property.h 2007-11-11 23:18:08.000000000 +0100
183 @@ -28,7 +28,7 @@
185 /* helper crap for data managing */
188 +using namespace std;
189 void append_int_to_vector(int p_val,vector<Uint8> &p_data);
190 void append_string_to_vector(string p_string,vector<Uint8> &p_data);
191 void append_vector_to_vector(vector<Uint8> &p_dest,vector<Uint8> &p_src);
192 diff -Narup legasynth-0.4.1/lib/sound_driver_manager.cpp legasynth-0.4.1.new/lib/sound_driver_manager.cpp
193 --- legasynth-0.4.1/lib/sound_driver_manager.cpp 2002-07-20 22:37:35.000000000 +0200
194 +++ legasynth-0.4.1.new/lib/sound_driver_manager.cpp 2007-11-11 23:36:31.000000000 +0100
195 @@ -92,7 +92,7 @@ void Sound_Driver_Manager::set_active_dr
199 -void Sound_Driver_Manager::stop_active_driver(bool p_lock=true) {
200 +void Sound_Driver_Manager::stop_active_driver(bool p_lock) {
202 if (active_driver_index<0) return;
204 diff -Narup legasynth-0.4.1/lib/typedefs.h legasynth-0.4.1.new/lib/typedefs.h
205 --- legasynth-0.4.1/lib/typedefs.h 2002-07-21 04:09:20.000000000 +0200
206 +++ legasynth-0.4.1.new/lib/typedefs.h 2007-11-11 23:15:49.000000000 +0100
207 @@ -29,7 +29,7 @@
208 #define ERROR(reason) cout << "Error: " << reason << endl;
211 -static inline string itostr(int m_val) {
212 +static inline std::string itostr(int m_val) {
214 char cacabuffer[100];
215 sprintf(cacabuffer,"%i",m_val);
216 @@ -38,4 +38,4 @@ static inline string itostr(int m_val) {
219 #endif
221 \ No newline at end of file
223 diff -Narup legasynth-0.4.1/posix/alsa_client.cpp legasynth-0.4.1.new/posix/alsa_client.cpp
224 --- legasynth-0.4.1/posix/alsa_client.cpp 2002-08-17 02:30:37.000000000 +0200
225 +++ legasynth-0.4.1.new/posix/alsa_client.cpp 2007-11-12 10:49:29.000000000 +0100
226 @@ -251,7 +251,8 @@ void Alsa_Client::dispatch_events() {
227 seq_play_event(&ev); */
228 } break;
230 -#if SND_LIB_MINOR >= 6
231 +#if 1
232 +//SND_LIB_MINOR >= 6
233 #define snd_seq_addr_equal(a,b) ((a)->client == (b)->client && (a)->port == (b)->port)
235 case SND_SEQ_EVENT_PORT_SUBSCRIBED: {
236 @@ -330,4 +331,4 @@ Alsa_Client::Alsa_Client(){
237 Alsa_Client::~Alsa_Client(){
240 -#endif
241 \ No newline at end of file
242 +#endif
243 diff -Narup legasynth-0.4.1/posix/sound_driver_oss.cpp legasynth-0.4.1.new/posix/sound_driver_oss.cpp
244 --- legasynth-0.4.1/posix/sound_driver_oss.cpp 2002-07-19 15:40:10.000000000 +0200
245 +++ legasynth-0.4.1.new/posix/sound_driver_oss.cpp 2007-11-12 10:52:30.000000000 +0100
246 @@ -116,7 +116,7 @@ int Sound_Driver_OSS::init() {
250 - (void*)audiobuffer=calloc(1,buffinf.fragsize);
251 + audiobuffer=calloc(1,buffinf.fragsize);
253 if ( audiobuffer==NULL ) {
255 @@ -227,4 +227,4 @@ Sound_Driver_OSS::~Sound_Driver_OSS(){
259 -#endif
260 \ No newline at end of file
261 +#endif
262 diff -Narup legasynth-0.4.1/posix/sound_driver_oss.h legasynth-0.4.1.new/posix/sound_driver_oss.h
263 --- legasynth-0.4.1/posix/sound_driver_oss.h 2002-07-18 23:31:04.000000000 +0200
264 +++ legasynth-0.4.1.new/posix/sound_driver_oss.h 2007-11-12 10:52:38.000000000 +0100
265 @@ -47,7 +47,7 @@ class Sound_Driver_OSS : public Sound_Dr
267 int sound_fd;
269 - Sint8 *audiobuffer;
270 + void *audiobuffer;
271 int buffersize;
272 int play_precision;
274 @@ -75,4 +75,4 @@ public:
277 #endif
278 -#endif
279 \ No newline at end of file
280 +#endif