blob: e357713b3df71c3359d1177fa57a0f7dc7c9b5c9 (
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
|
// license:BSD-3-Clause
// copyright-holders:Nathan Woods
#pragma once
#ifndef __WAVE_H__
#define __WAVE_H__
#include "imagedev/cassette.h"
/*****************************************************************************
* CassetteWave interface
*****************************************************************************/
class wave_device : public device_t,
public device_sound_interface
{
public:
wave_device(const machine_config &mconfig, std::string tag, device_t *owner, UINT32 clock);
static void static_set_cassette_tag(device_t &device, const char *cassette_tag);
protected:
// device-level overrides
virtual void device_config_complete() override;
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:
const char *m_cassette_tag;
cassette_image_device *m_cass;
};
extern const device_type WAVE;
#define WAVE_TAG "wave"
#define WAVE2_TAG "wave2"
#define MCFG_SOUND_WAVE_ADD(_tag, _cass_tag) \
MCFG_SOUND_ADD( _tag, WAVE, 0 ) \
wave_device::static_set_cassette_tag(*device, _cass_tag);
#endif /* __WAVE_H__ */
|