From d0f1c15a0f6df2dd51a754cb46e6175b7079c8f2 Mon Sep 17 00:00:00 2001 From: Olivier Galibert Date: Mon, 14 Apr 2025 11:31:53 +0200 Subject: 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 --- docs/source/luascript/ref-devices.rst | 49 +++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) (limited to 'docs/source/luascript/ref-devices.rst') diff --git a/docs/source/luascript/ref-devices.rst b/docs/source/luascript/ref-devices.rst index 1c3eabdbd2d..23820deedef 100644 --- a/docs/source/luascript/ref-devices.rst +++ b/docs/source/luascript/ref-devices.rst @@ -67,6 +67,9 @@ manager.machine.images manager.machine.slots Returns a device enumerator that will iterate over :ref:`slot devices ` in the system. +manager.machine.sounds + Returns a device enumerator that will iterate over + :ref:`sound devices ` in the system. emu.device_enumerator(device, [depth]) Returns a device enumerator that will iterate over :ref:`devices ` in the sub-tree starting at the @@ -624,6 +627,52 @@ image.device (read-only) The underlying :ref:`device `. +.. _luascript-ref-disound: + +Sound device interface +--------------------- + +Wraps MAME’s ``device_sound_interface`` class which is a mix-in implemented by +devices that inputs and/or ouputs sound. + +Instantiation +~~~~~~~~~~~~~ + +manager.machine.sounds[tag] + Gets an sound device by tag relative to the root machine device, or ``nil`` + if no such device exists or it is not a slot device. + +Properties +~~~~~~~~~~ + +sound.inputs (read-only) + Number of sound inputs of the device. + +sound.outputs (read-only) + Number of sound outputs of the device. + +sound.microphone (read-only) + True if the device is a microphone, false otherwise + +sound.speaker (read-only) + True if the device is a speaker, false otherwise + +sound.io_positions[] (read-only) + Non-empty only for microphones and speakers, indicates the positions of + the inputs or outputs as (x, y, z) coordinates (f.i. [-0.2, 0.0, 1.0]) + +sound.io_names[] (read-only) + Non-empty only for microphones and speakers, indicates the positions of + the inputs or outputs as strings (f.i. Front Left) + +sound.hook + A boolean indicating whether to tap the output samples of this device in + the global sound hook. + +sound.device (read-only) + The underlying :ref:`device `. + + .. _luascript-ref-dislot: Slot device interface -- cgit v1.2.3-70-g09d2