libsidplayfp  0.3.5
sidplay2.h
1 /***************************************************************************
2  sidplay2.h - Public sidplay header
3  -------------------
4  begin : Fri Jun 9 2000
5  copyright : (C) 2000 by Simon White
6  email : s_a_white@email.com
7  ***************************************************************************/
8 
9 /***************************************************************************
10  * *
11  * This program is free software; you can redistribute it and/or modify *
12  * it under the terms of the GNU General Public License as published by *
13  * the Free Software Foundation; either version 2 of the License, or *
14  * (at your option) any later version. *
15  * *
16  ***************************************************************************/
17 
18 #ifndef _sidplay2_h_
19 #define _sidplay2_h_
20 
21 #include <stdio.h>
22 
23 #include "sidtypes.h"
24 #include "sid2types.h"
25 #include "sidversion.h"
26 
27 class SidTune;
28 
29 // Private Sidplayer
30 namespace SIDPLAY2_NAMESPACE
31 {
32  class Player;
33 }
34 
38 class SID_EXTERN sidplay2
39 {
40 private:
41  SIDPLAY2_NAMESPACE::Player &sidplayer;
42 
43 public:
44  sidplay2 ();
45  virtual ~sidplay2 ();
46 
47  const sid2_config_t &config (void) const;
48  const sid2_info_t &info (void) const;
49 
56  int config (const sid2_config_t &cfg);
57 
63  const char *error (void) const;
64 
70  int fastForward (uint percent);
71 
78  int load (SidTune *tune);
79 
83  void pause (void);
84 
92  uint_least32_t play (short *buffer, uint_least32_t count);
93 
99  sid2_player_t state (void) const;
100 
104  void stop (void);
105 
112  void debug (bool enable, FILE *out);
113  void mute (int voice, bool enable);
114 
116 
117  SID_DEPRECATED uint_least32_t timebase (void) const { return 1; }
118  uint_least32_t time (void) const;
119  uint_least32_t mileage (void) const;
121 
122  operator bool() const { return (&sidplayer ? true: false); }
123  bool operator!() const { return (&sidplayer ? false: true); }
124 };
125 
126 #endif // _sidplay2_h_