diff options
Diffstat (limited to 'docs/source')
-rw-r--r-- | docs/source/techspecs/device_sound_interface.rst | 36 | ||||
-rw-r--r-- | docs/source/usingmame/mamemenus.rst | 10 |
2 files changed, 44 insertions, 2 deletions
diff --git a/docs/source/techspecs/device_sound_interface.rst b/docs/source/techspecs/device_sound_interface.rst index 859d2497477..8355781effc 100644 --- a/docs/source/techspecs/device_sound_interface.rst +++ b/docs/source/techspecs/device_sound_interface.rst @@ -238,8 +238,40 @@ hardware. Between gains and effects there is a fair chance saturation can be avoided later in the chain. +3.4 Timing +~~~~~~~~~~ -3.4 Gain management +.. code-block:: C++ + u32 sample_rate() const; + attotime sample_period() const; + + u64 start_index() const; + u64 end_index() const; + attotime start_time() const; + attotime end_time() const; + + attotime sample_to_time(u64 index) const; + +``sample_rate`` gives the current sample rate of the stream and +``sample_period`` the corresponding duration. + +Within a call to the update callback, ``start_index`` gives the number +(starting at zero at system power on) and ``start_time`` the time of +the first sample to compute in the update. ``end_index`` and +``end_time`` correspondingly indicate one past the last sample to +update, or in other words the first sample of the next update call. +Outside of an update callback, they all point to the first sample of +the next update call. + +Finally ``sample_to_time`` allows to convert from a sample number to a +time. + +Note that in case of change of sample rate sample numbers are +recalculated to end up as if the stream had had the new rate from the +start. And the times will still be such that sample 0 is at time 0. + + +3.5 Gain management ~~~~~~~~~~~~~~~~~~~ .. code-block:: C++ @@ -261,7 +293,7 @@ This is similar to the device gain control, with a twist: apply multiplies the current gain by the given value. -3.5 Misc. actions +3.6 Misc. actions ~~~~~~~~~~~~~~~~~ .. code-block:: C++ diff --git a/docs/source/usingmame/mamemenus.rst b/docs/source/usingmame/mamemenus.rst index d58bfe3756e..963bb42ecae 100644 --- a/docs/source/usingmame/mamemenus.rst +++ b/docs/source/usingmame/mamemenus.rst @@ -356,6 +356,16 @@ parameters of the Default chain are fixed. The default chain allows to create a global setup that one likes and have it applied everywhere by default. +In addition, this menu allows to choose the resampler to use when +converting sample rates between emulated devices. The type allows to +choose between a fast, lower quality one, "LoFi", and a slow, high +quality one "HQ". The HQ resampler is configurable. The latency +indicates the max latency of the resampler, which allows better +quality when higher, the filter length balances quality and speed +where a high value is highest quality but slowest speed, and phases +balances quality and resampler creation time, with one again higher +means better but slower. + Filter effect ~~~~~~~~~~~~~ |