libsidplayfp  0.3.5
sid2types.h
1 /***************************************************************************
2  sid2types.h - sidplay2 specific types
3  -------------------
4  begin : Fri Aug 10 2001
5  copyright : (C) 2001 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 _sid2types_h_
19 #define _sid2types_h_
20 
21 #include "sidtypes.h"
22 
23 class sidbuilder;
24 class EventContext;
25 struct SidTuneInfo;
26 
27 #ifndef SIDPLAY2_DEFAULTS
28 #define SIDPLAY2_DEFAULTS
29  // Maximum values
30  // Delays <= MAX produce constant results.
31  // Delays > MAX produce random results
32  const uint_least16_t SID2_MAX_POWER_ON_DELAY = 0x1FFF;
33  // Default settings
34  const uint_least32_t SID2_DEFAULT_SAMPLING_FREQ = 44100;
35  const bool SID2_DEFAULT_SID_SAMPLES = true; // Samples through sid
36  const uint_least16_t SID2_DEFAULT_POWER_ON_DELAY = SID2_MAX_POWER_ON_DELAY + 1;
37 #endif // SIDPLAY2_DEFAULTS
38 
39 typedef enum {sid2_playing = 0, sid2_paused, sid2_stopped} sid2_player_t;
40 typedef enum {sid2_mono = 1, sid2_stereo} sid2_playback_t;
41 typedef enum {sid2_envPS = 0, sid2_envTP, sid2_envBS, sid2_envR, sid2_envTR} sid2_env_t;
42 typedef enum {SID2_MODEL_CORRECT, SID2_MOS6581, SID2_MOS8580} sid2_model_t;
43 typedef enum {SID2_CLOCK_CORRECT, SID2_CLOCK_PAL, SID2_CLOCK_NTSC} sid2_clock_t;
44 typedef enum {SID2_INTERPOLATE, SID2_RESAMPLE_INTERPOLATE} sampling_method_t;
45 
46 
51 {
53  sid2_clock_t clockDefault;
54  bool clockForced;
56  sid2_clock_t clockSpeed;
64  sid2_env_t environment;
65  bool forceDualSids;
66  bool emulateStereo;
67  uint_least32_t frequency;
73  sid2_playback_t playback;
80  sid2_model_t sidDefault;
81  sidbuilder *sidEmulation;
83  sid2_model_t sidModel;
84  bool sidSamples;
85  uint_least32_t leftVolume;
86  uint_least32_t rightVolume;
87  uint_least16_t powerOnDelay;
89  uint_least32_t sid2crcCount;
95  sampling_method_t samplingMethod;
101 };
102 
107 {
108  const char **credits;
109  uint channels;
110  uint_least16_t driverAddr;
111  uint_least16_t driverLength;
112  const char *name;
113  const SidTuneInfo *tuneInfo; // May not need this
114  const char *version;
115  // load, config and stop calls will reset this
116  // and remove all pending events! 10th sec resolution.
117  EventContext *eventContext;
118  uint maxsids;
119  sid2_env_t environment;
120  uint_least16_t powerOnDelay;
121  uint_least32_t sid2crc;
123  uint_least32_t sid2crcCount;
124 };
125 
126 #endif // _sid2types_h_