blob: b1b89e09cc5f7a791b92544e63c0f70363a4c481 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
|
// license:BSD-3-Clause
// copyright-holders:Aaron Giles
/***************************************************************************
Amiga audio hardware
***************************************************************************/
#pragma once
#ifndef __SOUND_AMIGA_H__
#define __SOUND_AMIGA_H__
#include "emu.h"
//**************************************************************************
// TYPE DEFINITIONS
//**************************************************************************
// ======================> amiga_sound_device
class amiga_sound_device : public device_t, public device_sound_interface
{
public:
amiga_sound_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
~amiga_sound_device() {}
void update();
void data_w(int which, uint16_t data);
protected:
// device-level overrides
virtual void device_start() override;
// sound stream update overrides
virtual void sound_stream_update(sound_stream &stream, stream_sample_t **inputs, stream_sample_t **outputs, int samples) override;
private:
static const int CLOCK_DIVIDER = 16;
struct audio_channel
{
emu_timer *irq_timer;
uint32_t curlocation;
uint16_t curlength;
uint16_t curticks;
uint8_t index;
bool dma_enabled;
bool manualmode;
int8_t latched;
};
void dma_reload(audio_channel *chan);
// internal state
audio_channel m_channel[4];
sound_stream *m_stream;
TIMER_CALLBACK_MEMBER( signal_irq );
};
extern const device_type AMIGA;
#endif // __SOUND_AMIGA_H__
|