@@ -129,13 +129,10 @@ class LIBAUDCORE_PUBLIC Plugin
129129 const PluginType type;
130130 const PluginInfo info;
131131
132- virtual bool init () { return true ; }
133- virtual void cleanup () {}
132+ virtual bool init ();
133+ virtual void cleanup ();
134134
135- virtual int take_message (const char * code, const void * data, int size)
136- {
137- return -1 ;
138- }
135+ virtual int take_message (const char * code, const void * data, int size);
139136};
140137
141138class LIBAUDCORE_PUBLIC TransportPlugin : public Plugin
@@ -154,15 +151,9 @@ class LIBAUDCORE_PUBLIC TransportPlugin : public Plugin
154151 String & error) = 0;
155152
156153 virtual VFSFileTest test_file (const char * filename, VFSFileTest test,
157- String & error)
158- {
159- return VFSFileTest (0 );
160- }
154+ String & error);
161155
162- virtual Index<String> read_folder (const char * filename, String & error)
163- {
164- return Index<String>();
165- }
156+ virtual Index<String> read_folder (const char * filename, String & error);
166157};
167158
168159class LIBAUDCORE_PUBLIC PlaylistPlugin : public Plugin
@@ -194,10 +185,7 @@ class LIBAUDCORE_PUBLIC PlaylistPlugin : public Plugin
194185 * title: title of playlist (in)
195186 * items: playlist entries (in) */
196187 virtual bool save (const char * path, VFSFile & file, const char * title,
197- const Index<PlaylistAddItem> & items)
198- {
199- return false ;
200- }
188+ const Index<PlaylistAddItem> & items);
201189};
202190
203191class LIBAUDCORE_PUBLIC OutputPlugin : public Plugin
@@ -227,7 +215,7 @@ class LIBAUDCORE_PUBLIC OutputPlugin : public Plugin
227215
228216 /* Sets information about the song being played. This function will be
229217 * called before open_audio(). */
230- virtual void set_info (const char * filename, const Tuple & tuple) {}
218+ virtual void set_info (const char * filename, const Tuple & tuple);
231219
232220 /* Begins playback of a PCM stream. <format> is one of the FMT_*
233221 * enumeration values defined in libaudcore/audio.h. Returns true on
@@ -298,23 +286,20 @@ class LIBAUDCORE_PUBLIC EffectPlugin : public Plugin
298286 * perform crossfading). The flush() function should return false in this
299287 * case to prevent flush() from being called in downstream effect plugins.
300288 */
301- virtual bool flush (bool force) { return true ; }
289+ virtual bool flush (bool force);
302290
303291 /* Exactly like process() except that any buffers should be drained (i.e.
304292 * the data processed and returned). finish() will be called a second time
305293 * at the end of the last song in the playlist. */
306- virtual Index<float > & finish (Index<float > & data, bool end_of_playlist)
307- {
308- return process (data);
309- }
294+ virtual Index<float > & finish (Index<float > & data, bool end_of_playlist);
310295
311296 /* Required only for plugins that change the time domain (e.g. a time
312297 * stretch) or use read-ahead buffering. translate_delay() must do two
313298 * things: first, translate <delay> (which is in milliseconds) from the
314299 * output time domain back to the input time domain; second, increase
315300 * <delay> by the size of the read-ahead buffer. It should return the
316301 * adjusted delay. */
317- virtual int adjust_delay (int delay) { return delay; }
302+ virtual int adjust_delay (int delay);
318303};
319304
320305enum class InputKey
@@ -427,18 +412,12 @@ class LIBAUDCORE_PUBLIC InputPlugin : public Plugin
427412
428413 /* Optional. Writes metadata to the file, returning false on error. */
429414 virtual bool write_tuple (const char * filename, VFSFile & file,
430- const Tuple & tuple)
431- {
432- return false ;
433- }
415+ const Tuple & tuple);
434416
435417 /* Optional. Displays a window showing info about the file. In general,
436418 * this function should be avoided since Audacious already provides a file
437419 * info window. */
438- virtual bool file_info_box (const char * filename, VFSFile & file)
439- {
440- return false ;
441- }
420+ virtual bool file_info_box (const char * filename, VFSFile & file);
442421
443422protected:
444423 /* Prepares the output system for playback in the specified format. Also
@@ -489,10 +468,10 @@ class LIBAUDCORE_PUBLIC DockablePlugin : public Plugin
489468 }
490469
491470 /* GtkWidget * get_gtk_widget () */
492- virtual void * get_gtk_widget () { return nullptr ; }
471+ virtual void * get_gtk_widget ();
493472
494473 /* QWidget * get_qt_widget () */
495- virtual void * get_qt_widget () { return nullptr ; }
474+ virtual void * get_qt_widget ();
496475};
497476
498477class LIBAUDCORE_PUBLIC GeneralPlugin : public DockablePlugin
@@ -537,7 +516,7 @@ class LIBAUDCORE_PUBLIC IfacePlugin : public Plugin
537516 const char * icon) = 0;
538517 virtual void plugin_menu_remove (AudMenuID id, void func ()) = 0;
539518
540- virtual void startup_notify (const char * id) {}
519+ virtual void startup_notify (const char * id);
541520};
542521
543522#endif
0 commit comments