Package: mp3blaster / 1:3.2.5-3

05_macro.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
Index: mp3blaster-3.2.5/mpegsound/rawtofile.cc
===================================================================
--- mp3blaster-3.2.5.orig/mpegsound/rawtofile.cc	2009-03-06 17:14:38.000000000 +0100
+++ mp3blaster-3.2.5/mpegsound/rawtofile.cc	2009-03-06 17:18:05.000000000 +0100
@@ -60,7 +60,7 @@
 // Rawplayer class
 Rawtofile::~Rawtofile()
 {
-	if (filetype == WAV)
+	if (filetype == ST_WAV)
 	{
 		off_t filelen = lseek(audiohandle, 0, SEEK_CUR);
 		lseek(audiohandle, 0, SEEK_SET);
@@ -110,10 +110,10 @@
 	return true;
 }
 
-/* set type of file to write. Default: RAW (no header) */
+/* set type of file to write. Default: ST_RAW (no header) */
 bool Rawtofile::setfiletype(soundtype filetype)
 {
-	if (filetype != RAW && filetype != WAV)
+	if (filetype != ST_RAW && filetype != ST_WAV)
 		return false;
 
 	this->filetype = filetype;	
@@ -121,13 +121,13 @@
 }
 int Rawtofile::putblock_nt(void *buffer, int size)
 {
-	if (init_putblock && filetype != RAW)
+	if (init_putblock && filetype != ST_RAW)
 	{
 		int wordsize;
 	
 		wordsize = rawsamplesize;
 
-		if (filetype == WAV)
+		if (filetype == ST_WAV)
 		{
 		//initial datasize = 0...when all data is written, determine filesize
 		//and rewrite the header.
Index: mp3blaster-3.2.5/src/main.cc
===================================================================
--- mp3blaster-3.2.5.orig/src/main.cc	2009-03-06 17:14:38.000000000 +0100
+++ mp3blaster-3.2.5/src/main.cc	2009-03-06 17:18:18.000000000 +0100
@@ -3644,7 +3644,7 @@
 
 			if (!(decoder = new Mpegfileplayer(Fileplayer::AUDIODRV_OSS)) ||
 				!decoder->openfile(file,
-				file2write, WAV) || !decoder->initialize(NULL))
+				file2write, ST_WAV) || !decoder->initialize(NULL))
 			{
 				sprintf(bla, "Decoding of %s failed.", selitems[i]);
 				warning(bla);
Index: mp3blaster-3.2.5/src/splay.cc
===================================================================
--- mp3blaster-3.2.5.orig/src/splay.cc	2009-03-06 17:14:38.000000000 +0100
+++ mp3blaster-3.2.5/src/splay.cc	2009-03-06 17:18:05.000000000 +0100
@@ -84,7 +84,7 @@
 
     player=new Mpegfileplayer(Fileplayer::AUDIODRV_OSS);
 		if (!strcmp(splay_devicename, "-"))
-			didopen = player->openfile(filename, "/dev/stdout", WAV);
+			didopen = player->openfile(filename, "/dev/stdout", ST_WAV);
 		else
 			didopen = player->openfile(filename, splay_devicename);
 
Index: mp3blaster-3.2.5/mpegsound/mpegsound.h
===================================================================
--- mp3blaster-3.2.5.orig/mpegsound/mpegsound.h	2009-03-06 17:18:00.000000000 +0100
+++ mp3blaster-3.2.5/mpegsound/mpegsound.h	2009-03-06 17:18:05.000000000 +0100
@@ -164,7 +164,7 @@
 };
 #endif
 
-enum soundtype { NONE, RAW, WAV };
+enum soundtype { ST_NONE, ST_RAW, ST_WAV };
 
 typedef struct _waveheader {
   u_int32_t     main_chunk;  // 'RIFF'
@@ -964,7 +964,7 @@
 
   int geterrorcode(void)        {return __errorcode;};
 	struct song_info getsonginfo() { return info;};
-  virtual bool openfile(const char *filename, const char *device, soundtype write2file=NONE)=0;
+  virtual bool openfile(const char *filename, const char *device, soundtype write2file=ST_NONE)=0;
   virtual void closefile(void)                       =0;
   virtual void setforcetomono(short flag)            =0;
 	virtual void setdownfrequency(int)                 =0;
@@ -986,7 +986,7 @@
 protected:
   Fileplayer(); //thou shallt not instantiate fileplayer itself.
 
-  bool opendevice(const char *device, soundtype write2file=NONE);
+  bool opendevice(const char *device, soundtype write2file=ST_NONE);
 	void set_driver(audiodriver_t driver);
   bool seterrorcode(int errorno){__errorcode=errorno;return false;};
   Soundplayer *player;
@@ -1012,7 +1012,7 @@
   Wavefileplayer(audiodriver_t driver);
   ~Wavefileplayer();
 
-  bool openfile(const char *filename, const char *device, soundtype write2file=NONE);
+  bool openfile(const char *filename, const char *device, soundtype write2file=ST_NONE);
   void closefile(void); 
   void setforcetomono(short flag);
 	void setdownfrequency(int value) { if (value); }
@@ -1045,7 +1045,7 @@
   Mpegfileplayer(audiodriver_t driver);
   ~Mpegfileplayer();
 
-  bool openfile(const char *filename, const char *device, soundtype write2file=NONE);
+  bool openfile(const char *filename, const char *device, soundtype write2file=ST_NONE);
   void closefile(void);
   void setforcetomono(short flag);
   void set8bitmode() { if (server) server->set8bitmode(); }
@@ -1093,7 +1093,7 @@
   Oggplayer(audiodriver_t driver);
   ~Oggplayer();
 
-  bool openfile(const char *filename, const char *device, soundtype write2file=NONE);
+  bool openfile(const char *filename, const char *device, soundtype write2file=ST_NONE);
   void closefile(void);
   void setforcetomono(short flag);
   void set8bitmode();
@@ -1140,7 +1140,7 @@
 	SIDfileplayer(audiodriver_t driver);
 	~SIDfileplayer();
 
-	bool openfile(const char *filename, const char *device, soundtype write2file=NONE);
+	bool openfile(const char *filename, const char *device, soundtype write2file=ST_NONE);
 	bool initialize(void *data) { if(data); return true; }
 	void closefile(void);
 	void setforcetomono(short flag);