Project

General

Profile

adplug-xmms.diff

Patch file - Jim Turner, December 08, 2017 07:20

View differences:

adplug-xmms.cc 2017-12-07 19:17:41.853383391 -0600
32 32
#include <libaudcore/i18n.h>
33 33
#include <libaudcore/plugin.h>
34 34
#include <libaudcore/runtime.h>
35
#include <libaudcore/preferences.h>
35 36

  
36 37
#include "adplug-xmms.h"
37 38

  
39
#define MIN_RATE 8000
40
#define MAX_RATE 192000
41
#define RATE_STEP 50
42

  
38 43
class AdPlugXMMS : public InputPlugin
39 44
{
40 45
public:
41 46
    static const char * const exts[];
47
    static const PreferencesWidget widgets[];
48
    static const PluginPreferences prefs;
49
    static const char * const defaults[];
42 50

  
43 51
    static constexpr PluginInfo info = {
44 52
        N_("AdPlug (AdLib Player)"),
45
        PACKAGE
53
        PACKAGE,
54
        nullptr,
55
        & prefs
46 56
    };
47 57

  
48 58
    constexpr AdPlugXMMS () : InputPlugin (info, InputInfo ()
......
288 298
 "Endless", "FALSE",
289 299
 nullptr};
290 300

  
301
const PreferencesWidget AdPlugXMMS::widgets[] = {
302
    WidgetCheck (N_("16 Bit?"),
303
        WidgetBool (CFG_VERSION, "16bit")),
304
    WidgetCheck (N_("Sterio?"),
305
        WidgetBool (CFG_VERSION, "Sterio")),
306
    WidgetSpin (N_("Frequency"),
307
        WidgetInt (CFG_VERSION, "Frequency"), {MIN_RATE, MAX_RATE, RATE_STEP, N_("Hz")}),
308
    WidgetCheck (N_("Endless?"),
309
        WidgetBool (CFG_VERSION, "Endless"))
310
};
311

  
312
const PluginPreferences AdPlugXMMS::prefs = {{widgets}};
313

  
291 314
bool AdPlugXMMS::init ()
292 315
{
293 316
  aud_config_set_defaults (CFG_VERSION, adplug_defaults);