diff options
author | 2025-04-14 11:31:53 +0200 | |
---|---|---|
committer | 2025-04-27 22:23:20 +0200 | |
commit | d0f1c15a0f6df2dd51a754cb46e6175b7079c8f2 (patch) | |
tree | be35c94340442af08c316a8679089ee68e119fac /src/devices/sound/disc_cls.h | |
parent | ec636faeba5c5841c5a4a35b7c9dc2f06a00f538 (diff) |
New sound infrastructure.
Should be added soon:
- mute
- speaker/microphone resampling
To be added a little later:
- compression
- reverb
Needs to be added by someone else:
- coreaudio
- direct
- portaudio
- xaudio2
- js
Diffstat (limited to 'src/devices/sound/disc_cls.h')
-rw-r--r-- | src/devices/sound/disc_cls.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/devices/sound/disc_cls.h b/src/devices/sound/disc_cls.h index 6bd94631bde..2e301099b04 100644 --- a/src/devices/sound/disc_cls.h +++ b/src/devices/sound/disc_cls.h @@ -120,13 +120,14 @@ public: /* Add gain to the output and put into the buffers */ /* Clipping will be handled by the main sound system */ double val = DISCRETE_INPUT(0) * DISCRETE_INPUT(1); - m_outview->put(m_outview_sample++, val * (1.0 / 32768.0)); + m_stream->put(m_stream_output, m_outview_sample++, val * (1.0 / 32768.0)); } virtual int max_output() override { return 0; } - virtual void set_output_ptr(write_stream_view &view) override { m_outview = &view; m_outview_sample = 0; } + virtual void set_output_ptr(sound_stream &stream, int output) override { m_stream = &stream; m_stream_output = output; m_outview_sample = 0; } private: - write_stream_view *m_outview = nullptr; - u32 m_outview_sample = 0U; + sound_stream *m_stream = nullptr; + int m_stream_output = 0; + u32 m_outview_sample = 0U; }; DISCRETE_CLASS(dso_csvlog, 0, @@ -233,10 +234,9 @@ public: //protected: uint32_t m_stream_in_number = 0; - read_stream_view const *m_inview = nullptr; /* current in ptr for stream */ uint32_t m_inview_sample = 0; private: - void stream_generate(sound_stream &stream, std::vector<read_stream_view> const &inputs, std::vector<write_stream_view> &outputs); + void stream_generate(sound_stream &stream); double m_gain = 0.0; /* node gain */ double m_offset = 0.0; /* node offset */ |