@@ -54,15 +54,15 @@ extern "C" const VisPluginInfo *get_plugin_info (int *count)
5454 * http://libvisual.sourceforge.net/newdocs/docs/html/struct__VisActorPlugin.html */
5555 static VisActorPlugin actor[1 ];
5656 static VisPluginInfo info[1 ];
57-
57+
5858 actor[0 ].requisition = lv_projectm_requisition;
5959 actor[0 ].palette = lv_projectm_palette;
6060 actor[0 ].render = lv_projectm_render;
6161 actor[0 ].vidoptions .depth = VISUAL_VIDEO_DEPTH_GL; /* We want GL clearly */
62-
63-
62+
63+
6464 info[0 ].type = (char *)VISUAL_PLUGIN_TYPE_ACTOR;
65-
65+
6666 info[0 ].plugname = (char *)" projectM" ;
6767 info[0 ].name = (char *)" libvisual projectM" ;
6868 info[0 ].author = (char *)" Peter Sperl" ;
@@ -112,8 +112,8 @@ extern "C" int lv_projectm_init (VisPluginData *plugin)
112112 // FIXME
113113 priv->PM = new projectM (config_file);
114114 // globalPM = (projectM *)wipemalloc( sizeof( projectM ) );
115-
116-
115+
116+
117117
118118 return 0 ;
119119}
@@ -157,14 +157,14 @@ extern "C" int lv_projectm_dimension (VisPluginData *plugin, VisVideo *video, in
157157
158158 visual_video_set_dimension (video, width, height);
159159
160- priv->PM ->projectM_resetGL ( width, height );
160+ priv->PM ->projectM_resetGL ( width, height );
161161
162162 return 0 ;
163163}
164164
165165/* This is the main event loop, where all kind of events can be handled, more information
166166 * regarding these can be found at:
167- * http://libvisual.sourceforge.net/newdocs/docs/html/union__VisEvent.html
167+ * http://libvisual.sourceforge.net/newdocs/docs/html/union__VisEvent.html
168168 */
169169extern " C" int lv_projectm_events (VisPluginData *plugin, VisEventQueue *events)
170170{
@@ -175,13 +175,13 @@ extern "C" int lv_projectm_events (VisPluginData *plugin, VisEventQueue *events)
175175 projectMEvent evt;
176176 projectMKeycode key;
177177 projectMModifier mod;
178-
179- while (visual_event_queue_poll (events, &ev))
178+
179+ while (visual_event_queue_poll (events, &ev))
180180 {
181- switch (ev.type )
181+ switch (ev.type )
182182 {
183183 case VISUAL_EVENT_KEYUP:
184-
184+
185185 evt = lv2pmEvent ( ev.type );
186186 key = lv2pmKeycode ( ev.event .keyboard .keysym .sym );
187187 mod = lv2pmModifier ( ev.event .keyboard .keysym .mod );
@@ -194,22 +194,22 @@ extern "C" int lv_projectm_events (VisPluginData *plugin, VisEventQueue *events)
194194 break ;
195195 case VISUAL_EVENT_NEWSONG:
196196 priv->PM ->projectM_setTitle (ev.event .newsong .songinfo ->songname );
197-
197+
198198 break ;
199-
199+
200200 default : /* to avoid warnings */
201201 break ;
202202 }
203203 }
204-
204+
205205 return 0 ;
206206}
207207
208208/* Using this function we can update the palette when we're in 8bits mode, which
209209 * we aren't with projectm, so just ignore :) */
210210extern " C" VisPalette *lv_projectm_palette (VisPluginData *plugin)
211211{
212- return NULL ;
212+ return (VisPalette *) NULL ;
213213}
214214
215215/* This is where the real rendering happens! This function is what we call, many times
@@ -218,7 +218,7 @@ extern "C" int lv_projectm_render (VisPluginData *plugin, VisVideo *video, VisAu
218218{
219219 ProjectmPrivate *priv = (ProjectmPrivate*)visual_object_get_private (VISUAL_OBJECT (plugin));
220220 VisBuffer pcmb;
221- float pcm[2 ][512 ];
221+ float pcm[2 ][512 ];
222222 int i;
223223
224224 if (video->parent != NULL ) lv_projectm_dimension (plugin, video->parent , video->parent ->width , video->parent ->height );
@@ -231,7 +231,7 @@ extern "C" int lv_projectm_render (VisPluginData *plugin, VisVideo *video, VisAu
231231 visual_audio_get_sample (audio, &pcmb, (char *)VISUAL_AUDIO_CHANNEL_RIGHT);
232232
233233 priv->PM ->pcm ()->addPCMfloat (*pcm,512 );
234-
234+
235235 priv->PM ->renderFrame ();
236236
237237 return 0 ;
@@ -243,9 +243,9 @@ std::string read_config()
243243{
244244
245245 int n;
246-
246+
247247 char num[512 ];
248- FILE *in;
248+ FILE *in;
249249 FILE *out;
250250
251251 char * home;
@@ -261,8 +261,8 @@ std::string read_config()
261261 strcpy (projectM_home+strlen (home), " /.projectM/config.inp" );
262262 projectM_home[strlen (home)+strlen (" /.projectM/config.inp" )]=' \0 ' ;
263263
264-
265- if ((in = fopen (projectM_home, " r" )) != 0 )
264+
265+ if ((in = fopen (projectM_home, " r" )) != 0 )
266266 {
267267 printf (" reading ~/.projectM/config.inp \n " );
268268 fclose (in);
@@ -280,24 +280,24 @@ std::string read_config()
280280 strcpy (projectM_home, home);
281281 strcpy (projectM_home+strlen (home), " /.projectM/config.inp" );
282282 projectM_home[strlen (home)+strlen (" /.projectM/config.inp" )]=' \0 ' ;
283-
283+
284284 if ((out = fopen (projectM_home," w" ))!=0 )
285285 {
286-
287- if ((in = fopen (projectM_config, " r" )) != 0 )
286+
287+ if ((in = fopen (projectM_config, " r" )) != 0 )
288288 {
289-
289+
290290 while (fgets (num,80 ,in)!=NULL )
291291 {
292292 fputs (num,out);
293293 }
294294 fclose (in);
295295 fclose (out);
296-
297296
298- if ((in = fopen (projectM_home, " r" )) != 0 )
299- {
300- printf (" created ~/.projectM/config.inp successfully\n " );
297+
298+ if ((in = fopen (projectM_home, " r" )) != 0 )
299+ {
300+ printf (" created ~/.projectM/config.inp successfully\n " );
301301 fclose (in);
302302 return std::string (projectM_home);
303303 }
@@ -308,16 +308,16 @@ std::string read_config()
308308 else
309309 {
310310 printf (" Cannot create ~/.projectM/config.inp, using default config file\n " );
311- if ((in = fopen (projectM_config, " r" )) != 0 )
311+ if ((in = fopen (projectM_config, " r" )) != 0 )
312312 { printf (" Successfully opened default config file\n " );
313313 fclose (in);
314314 return std::string (projectM_config);}
315315 else { printf (" Using implementation defaults, your system is really messed up, I'm suprised we even got this far\n " ); abort ();}
316-
316+
317317 }
318318
319319 }
320320
321- }
321+ }
322322
323323
0 commit comments