~ubuntu-branches/debian/sid/mame/sid

« back to all changes in this revision

Viewing changes to src/emu/disound.h

  • Committer: Package Import Robot
  • Author(s): Jordi Mallach, Emmanuel Kasper, Jordi Mallach
  • Date: 2012-06-05 20:02:23 UTC
  • mfrom: (0.3.1) (0.1.4)
  • Revision ID: package-import@ubuntu.com-20120605200223-gnlpogjrg6oqe9md
Tags: 0.146-1
[ Emmanuel Kasper ]
* New upstream release
* Drop patch to fix man pages section and patches to link with flac 
  and jpeg system lib: all this has been pushed upstream by Cesare Falco
* Add DM-Upload-Allowed: yes field.

[ Jordi Mallach ]
* Create a "gnu" TARGETOS stanza that defines NO_AFFINITY_NP.
* Stop setting TARGETOS to "unix" in d/rules. It should be autodetected,
  and set to the appropriate value.
* mame_manpage_section.patch: Change mame's manpage section to 6 (games),
  in the TH declaration.

Show diffs side-by-side

added added

removed removed

Lines of Context:
75
75
#define MCFG_SOUND_CONFIG(_config) \
76
76
        MCFG_DEVICE_CONFIG(_config)
77
77
 
 
78
#define MCFG_SOUND_ROUTE(_output, _target, _gain) \
 
79
        device_sound_interface::static_add_route(*device, _output, _target, _gain); \
 
80
 
78
81
#define MCFG_SOUND_ROUTE_EX(_output, _target, _gain, _input) \
79
82
        device_sound_interface::static_add_route(*device, _output, _target, _gain, _input); \
80
83
 
81
 
#define MCFG_SOUND_ROUTE(_output, _target, _gain) \
82
 
        MCFG_SOUND_ROUTE_EX(_output, _target, _gain, AUTO_ALLOC_INPUT)
83
 
 
84
84
#define MCFG_SOUND_ROUTES_RESET() \
85
85
        device_sound_interface::static_reset_routes(*device); \
86
86
 
87
87
 
 
88
#define MCFG_MIXER_ROUTE(_output, _target, _gain, _mixoutput) \
 
89
        device_sound_interface::static_add_route(*device, _output, _target, _gain, AUTO_ALLOC_INPUT, _mixoutput); \
 
90
 
 
91
 
88
92
 
89
93
//**************************************************************************
90
94
//  TYPE DEFINITIONS
101
105
        class sound_route
102
106
        {
103
107
        public:
104
 
                sound_route(int output, int input, float gain, const char *target);
 
108
                sound_route(int output, int input, float gain, const char *target, UINT32 mixoutput);
105
109
 
106
110
                const sound_route *next() const { return m_next; }
107
111
 
108
112
                sound_route *           m_next;                         // pointer to next route
109
113
                UINT32                          m_output;                       // output index, or ALL_OUTPUTS
110
114
                UINT32                          m_input;                        // target input index
 
115
                UINT32                          m_mixoutput;            // target mixer output
111
116
                float                           m_gain;                         // gain
112
117
                astring                         m_target;                       // target tag
113
118
        };
120
125
        const sound_route *first_route() const { return m_route_list.first(); }
121
126
 
122
127
        // static inline configuration helpers
123
 
        static void static_add_route(device_t &device, UINT32 output, const char *target, double gain, UINT32 input = AUTO_ALLOC_INPUT);
 
128
        static sound_route &static_add_route(device_t &device, UINT32 output, const char *target, double gain, UINT32 input = AUTO_ALLOC_INPUT, UINT32 mixoutput = 0);
124
129
        static void static_reset_routes(device_t &device);
125
130
 
126
131
        // sound stream update overrides
134
139
        int outputs() const;
135
140
        sound_stream *input_to_stream_input(int inputnum, int &stream_inputnum);
136
141
        sound_stream *output_to_stream_output(int outputnum, int &stream_outputnum);
 
142
        void set_input_gain(int inputnum, float gain);
137
143
        void set_output_gain(int outputnum, float gain);
 
144
        int inputnum_from_device(device_t &device, int outputnum = 0) const;
138
145
 
139
146
protected:
140
147
        // optional operation overrides
152
159
// iterator
153
160
typedef device_interface_iterator<device_sound_interface> sound_interface_iterator;
154
161
 
 
162
 
 
163
 
 
164
// ======================> device_mixer_interface
 
165
 
 
166
class device_mixer_interface : public device_sound_interface
 
167
{
 
168
public:
 
169
        // construction/destruction
 
170
        device_mixer_interface(const machine_config &mconfig, device_t &device, int outputs = 1);
 
171
        virtual ~device_mixer_interface();
 
172
 
 
173
protected:
 
174
        // optional operation overrides
 
175
        virtual void interface_pre_start();
 
176
        virtual void interface_post_load();
 
177
 
 
178
        // sound interface overrides
 
179
        virtual void sound_stream_update(sound_stream &stream, stream_sample_t **inputs, stream_sample_t **outputs, int samples);
 
180
 
 
181
        // internal state
 
182
        UINT8                           m_outputs;                              // number of outputs
 
183
        dynamic_array<UINT8> m_outputmap;                       // map of inputs to outputs
 
184
        sound_stream *          m_mixer_stream;                 // mixing stream
 
185
};
 
186
 
 
187
// iterator
 
188
typedef device_interface_iterator<device_mixer_interface> mixer_interface_iterator;
 
189
 
 
190
 
155
191
#endif  /* __DISOUND_H__ */