aboutsummaryrefslogtreecommitdiff
path: root/libretro.h
diff options
context:
space:
mode:
authorTwinaphex2018-03-31 13:49:54 +0200
committerGitHub2018-03-31 13:49:54 +0200
commit9f836824d9f447ac8f2ffc829ebb02e49caf5e57 (patch)
tree55988350254e2e685e0c55d095d9a0f8d64c41b2 /libretro.h
parent8ca47fd3e698aa0ccc63bb62784818d243cf3643 (diff)
parentbb13407869200360f90e10233fc649fc056f4e98 (diff)
downloadsnesemu-9f836824d9f447ac8f2ffc829ebb02e49caf5e57.tar.gz
snesemu-9f836824d9f447ac8f2ffc829ebb02e49caf5e57.tar.bz2
snesemu-9f836824d9f447ac8f2ffc829ebb02e49caf5e57.zip
Merge pull request #53 from Dwedit/submission_1
Add support for Audio/Video Disable flags and Hard Disable Audio
Diffstat (limited to 'libretro.h')
-rw-r--r--libretro.h41
1 files changed, 41 insertions, 0 deletions
diff --git a/libretro.h b/libretro.h
index 469b86a..ed1902b 100644
--- a/libretro.h
+++ b/libretro.h
@@ -901,6 +901,47 @@ enum retro_mod
* writeable (and readable).
*/
+#define RETRO_ENVIRONMENT_GET_AUDIO_VIDEO_ENABLE (47 | RETRO_ENVIRONMENT_EXPERIMENTAL)
+ /* int * --
+ * Tells the core if the frontend wants audio or video.
+ * If disabled, the frontend will discard the audio or video,
+ * so the core may decide to skip generating a frame or generating audio.
+ * This is mainly used for increasing performance.
+ * Bit 0 (value 1): Enable Video
+ * Bit 1 (value 2): Enable Audio
+ * Bit 2 (value 4): Use Fast Savestates.
+ * Bit 3 (value 8): Hard Disable Audio
+ * Other bits are reserved for future use and will default to zero.
+ * If video is disabled:
+ * * The frontend wants the core to not generate any video,
+ * including presenting frames via hardware acceleration.
+ * * The frontend's video frame callback will do nothing.
+ * * After running the frame, the video output of the next frame should be
+ * no different than if video was enabled, and saving and loading state
+ * should have no issues.
+ * If audio is disabled:
+ * * The frontend wants the core to not generate any audio.
+ * * The frontend's audio callbacks will do nothing.
+ * * After running the frame, the audio output of the next frame should be
+ * no different than if audio was enabled, and saving and loading state
+ * should have no issues.
+ * Fast Savestates:
+ * * Guaranteed to be created by the same binary that will load them.
+ * * Will not be written to or read from the disk.
+ * * Suggest that the core assumes loading state will succeed.
+ * * Suggest that the core updates its memory buffers in-place if possible.
+ * * Suggest that the core skips clearing memory.
+ * * Suggest that the core skips resetting the system.
+ * * Suggest that the core may skip validation steps.
+ * Hard Disable Audio:
+ * * Used for a secondary core when running ahead.
+ * * Indicates that the frontend will never need audio from the core.
+ * * Suggests that the core may stop synthesizing audio, but this should not
+ * compromise emulation accuracy.
+ * * Audio output for the next frame does not matter, and the frontend will
+ * never need an accurate audio state in the future.
+ * * State will never be saved when using Hard Disable Audio.
+ */
enum retro_hw_render_interface_type
{
RETRO_HW_RENDER_INTERFACE_VULKAN = 0,