Basics
======

     (use-modules (sdl2))

 -- Scheme Procedure: sdl-init [SUBSYSTEMS]
     Initialize the SDL library.  This must be called before using any other SDL procedure.

     SUBSYSTEMS is an optional list of symbols that specifies the subsystems to initialize.  All subsystems are initialized by default. The possible flags are timer, audio, video, haptic, game-controller, and events.

 -- Scheme Procedure: sdl-quit
     Quit all activated SDL subsystems.  This procedure should be called upon all exit conditions.

 -- Scheme Procedure: sdl-version
     Return a three element list containing the major, minor, and patch version of the linked SDL library.

 -- Scheme Procedure: sdl-ticks
     Return the number of milliseconds since the SDL library was initialized.

Window Management
=================

     (use-modules (sdl2 video))

Windows
-------

 -- Scheme Procedure: make-window [#:title "Guile SDL2 Window"]
     [#:position (#f #f)]
     [#:size (640 480)]
     [#:maximize? #f]
     [#:minimize? #f]
     [#:opengl? #f]
     [#:border? #t]
     [#:fullscreen? #f]
     [#:fullscreen-desktop? #f]
     [#:grab-input? #f]
     [#:high-dpi? #f]
     Create a new window named TITLE with dimensions SIZE located at POSITION on the display.  POSITION and SIZE are two-element lists in the form (x y), where each coordinate is measured in pixels.  In the case of POSITION, a coordinate may use the special symbol CENTER to indicate that the window should be centered on that axis, or #f to indicate that it does not matter where the window is located on that axis.

 -- Scheme Procedure: close-window! window
     Close WINDOW.

 -- Scheme Procedure: call-with-window window proc
     Call PROC with WINDOW, an SDL window object, and close it when PROC returns or otherwise exits.

 -- Scheme Procedure: window-title window
     Return the title for WINDOW.

 -- Scheme Procedure: window-size window
     Return the dimensions of WINDOW.

 -- Scheme Procedure: window-position window
     Return the position of WINDOW on the display.

 -- Scheme Procedure: window-id window
     Return the numeric ID of WINDOW.

 -- Scheme Procedure: id->window id
     Return the window corresponding to ID, a positive integer, or #f if there is no such window.

 -- Scheme Procedure: hide-window! window
     Hide WINDOW.

 -- Scheme Procedure: show-window! window
     Show WINDOW and focus on it.

 -- Scheme Procedure: maximize-window! window
     Make WINDOW as large as possible.

 -- Scheme Procedure: minimize-window! window
     Shrink WINDOW to an iconic representation.

 -- Scheme Procedure: raise-window! window
     Raise WINDOW above all other windows and set input focus.

 -- Scheme Procedure: restore-window! window
     Restore the size and position of a minimized or maximized WINDOW.

 -- Scheme Procedure: set-window-border! window border?
     When BORDER?, draw the usual border around WINDOW, otherwise remove the border.

 -- Scheme Procedure: set-window-title! window title
     Set the title of WINDOW to the string TITLE.

 -- Scheme Procedure: set-window-position! window position
     Set the position of WINDOW to POSITION, a two-element list of (x,y) coordinates measured in pixels.

 -- Scheme Procedure: set-window-size! window size
     Set the dimensions of WINDOW to SIZE, a two-element list of (width,height) coordinates measured in pixels.

 -- Scheme Procedure: set-window-fullscreen! window fullscreen? [#:desktop?]
     Toggle fullscreen mode on/off for WINDOW.  If FULLSCREEN?, fullscreen mode is activated, otherwise it is deactivated.  If FULLSCREEN? and DESKTOP?, a special "fake" fullscreen mode is used that takes the size of the desktop.

OpenGL
------

 -- Scheme Procedure: make-gl-context window
     Create an OpenGL context for WINDOW.

 -- Scheme Procedure: delete-gl-context! context
     Delete CONTEXT, an OpenGL context object.

 -- Scheme Procedure: call-with-gl-context window proc
     Call PROC with a new OpenGL context created for WINDOW, and close the context when PROC returns or otherwise exits.

 -- Scheme Procedure: swap-gl-window window
     Update WINDOW with OpenGL rendering.

 -- Scheme Procedure: set-gl-attribute! attr value
     Set the OpenGL attribute represented by the symbol ATTR to VALUE.  Possible values for ATTR are:

       * red-size

       * green-size

       * blue-size

       * alpha-size

       * buffer-size

       * double-buffer

       * depth-size

       * stencil-size

       * accum-red-size

       * accum-green-size

       * accum-blue-size

       * stereo

       * multisample-buffers

       * multisample-samples

       * retained-backing

       * context-major-version

       * context-minor-version

       * context-egl

       * context-flags

       * context-profile-mask

       * share-with-current-context

       * framebuffer-srgb-capable

 -- Scheme Procedure: set-gl-swap-interval! interval
     Set the framebuffer swap interval for the current OpenGL context to the type indicated by the symbol INTERVAL.  Possible values of INTERVAL are:

       * immediate, for immediate updates

       * vsync, for updates synchronized with the screen's vertical retrace

       * late-swap-tear, for late swap tearing

     Late swap tearing works the same as vsync, but if the vertical retrace has been missed for a given frame, buffers are swapped immediately, which might be less jarring for the user during occasional framerate drops.

Input
=====

Keyboard
--------

     (use-modules (sdl2 input keyboard))

 -- Scheme Procedure: key-pressed? key
     Return #t if KEY is currently being pressed.

 -- Scheme Procedure: key-released? key
     Return #t is KEY is not currently being pressed.

Mouse
-----

     (use-modules (sdl2 input mouse))

 -- Scheme Procedure: mouse-x
     Return the x coordinate of the mouse cursor.

 -- Scheme Procedure: mouse-y
     Return the y coordinate of the mouse cursor.

 -- Scheme Procedure: mouse-button-pressed? button
     Return #t if BUTTON is currently being pressed.

 -- Scheme Procedure: mouse-button-released? button
     Return #t if BUTTON is not currently being pressed.

Joysticks
---------

     (use-modules (sdl2 input joystick))

 -- Scheme Procedure: num-joysticks
     Return the current number of connected joystick devices.

 -- Scheme Procedure: open-joystick device-index
     Return a joystick object for the physical joystick device associated with DEVICE-INDEX.

 -- Scheme Procedure: close-joystick joystick
     Close JOYSTICK.

 -- Scheme Procedure: joystick-instance-id joystick
     Return the instance id of JOYSTICK.

 -- Scheme Procedure: joystick-power-level joystick
     Return the symbolic battery power level for JOYSTICK, either unknown, empty, low, medium, full, or wired.

 -- Scheme Procedure: joystick-num-axes joystick
     Return the number of axes for JOYSTICK.

 -- Scheme Procedure: joystick-num-balls joystick
     Return the number of balls for JOYSTICK.

 -- Scheme Procedure: joystick-num-buttons joystick
     Return the number of buttons for JOYSTICK.

 -- Scheme Procedure: joystick-num-hats joystick
     Return the number of hats for JOYSTICK.

Game Controllers
----------------

     (use-modules (sdl2 input game-controller))

 -- Scheme Procedure: load-game-controller-mappings! file
     Load game controller mapping from FILE and return the number of mappings added this way.

     See https://raw.github.com/gabomdq/SDL_GameControllerDB/master/gamecontrollerdb.txt for a community maintained controller mapping file.

 -- Scheme Procedure: open-game-controller joystick-index
     Return a game controller object for the physical joystick device associated with the JOYSTICK-INDEX.

 -- Scheme Procedure: close-game-controller controller
     Close CONTROLLER.

 -- Scheme Procedure: game-controller? controller
     Close CONTROLLER.

 -- Scheme Procedure: game-controller-attached? controller
     Return #t if CONTROLLER is currently in use.

 -- Scheme Procedure: game-controller-joystick controller
     Return the underlying joystick object associated with CONTROLLER.

 -- Scheme Procedure: game-controller-name controller
     Return the human readable name for CONTROLLER.

 -- Scheme Procedure: game-controller-axis controller axis
     Return a number in the range [-32768, 32767] representing the current state of AXIS on CONTROLLER.

     AXIS may be one of the following symbols:

       * left-x

       * left-y

       * right-x

       * right-y

       * trigger-left

       * trigger-right

 -- Scheme Procedure: game-controller-button-pressed? controller button
     Return #t if BUTTON is pressed on CONTROLLER.

     BUTTON may be one of the following symbols:

       * a

       * b

       * x

       * y

       * back

       * guide

       * start

       * left-stick

       * right-stick

       * left-shoulder

       * right-shoulder

       * dpad-up

       * dpad-down

       * dpad-left

       * dpad-right

 -- Scheme Procedure: game-controller-index? joystick-index
     Return #t if JOYSTICK-INDEX is a valid game controller index.

Events
======

     (use-modules (sdl2 events))

 -- Scheme Procedure: make-quit-event timestamp

 -- Scheme Procedure: quit-event? e
     Return #t if E is a quit event.

 -- Scheme Procedure: quit-event-timestamp e

 -- Scheme Procedure: make-window-event timestamp window-id type vector

 -- Scheme Procedure: window-event? e
     Return #t if E is a window event.

 -- Scheme Procedure: window-shown-event? e
     Return #t if E is a window shown event.

 -- Scheme Procedure: window-hidden-event? e
     Return #t if E is a window hidden event.

 -- Scheme Procedure: window-exposed-event? e
     Return #t if E is a window exposed event.

 -- Scheme Procedure: window-moved-event? e
     Return #t if E is a window moved event.

 -- Scheme Procedure: window-resized-event? e
     Return #t if E is a window resized event.

 -- Scheme Procedure: window-size-changed-event? e
     Return #t if E is a window size changed event.

 -- Scheme Procedure: window-minimized-event? e
     Return #t if E is a window minimized event.

 -- Scheme Procedure: window-maximized-event? e
     Return #t if E is a window maximized event.

 -- Scheme Procedure: window-restored-event? e
     Return #t if E is a window restored event.

 -- Scheme Procedure: window-enter-event? e
     Return #t if E is a window enter event.

 -- Scheme Procedure: window-leave-event? e
     Return #t if E is a window leave event.

 -- Scheme Procedure: window-focus-gained-event? e
     Return #t if E is a window focus gained event.

 -- Scheme Procedure: window-focus-lost-event? e
     Return #t if E is a window focus lost event.

 -- Scheme Procedure: window-closed-event? e
     Return #t if E is a window closed event.

 -- Scheme Procedure: window-event-timestamp e

 -- Scheme Procedure: window-event-window-id e

 -- Scheme Procedure: window-event-type e

 -- Scheme Procedure: window-event-vector e

 -- Scheme Procedure: make-keyboard-event timestamp
     window-id
     pressed?
     repeat?
     key
     scancode
     modifiers

 -- Scheme Procedure: keyboard-event? e
     Return #t if E is a keyboard event.

 -- Scheme Procedure: keyboard-down-event? e
     Return #t if E is a key press event.

 -- Scheme Procedure: keyboard-up-event? e
     Return #t if E is a key release event.

 -- Scheme Procedure: keyboard-event-timestamp e

 -- Scheme Procedure: keyboard-event-window-id e

 -- Scheme Procedure: keyboard-event-pressed? e

 -- Scheme Procedure: keyboard-event-repeat? e

 -- Scheme Procedure: keyboard-event-key e

 -- Scheme Procedure: keyboard-event-scancode e

 -- Scheme Procedure: keyboard-event-modifiers e

 -- Scheme Procedure: make-text-input-event timestamp window-id text

 -- Scheme Procedure: text-input-event? e
     Return #t if E is a text input event.

 -- Scheme Procedure: text-input-event-timestamp e

 -- Scheme Procedure: text-input-event-window-id e

 -- Scheme Procedure: text-input-event-text e

 -- Scheme Procedure: make-mouse-button-event timestamp
     window-id
     which
     button
     pressed?
     clicks
     x
     y

 -- Scheme Procedure: mouse-button-event? e
     Return #t if E is a mouse button event.

 -- Scheme Procedure: mouse-button-down-event? e
     Return #t if E is a mouse button down event.

 -- Scheme Procedure: mouse-button-up-event? e
     Return #t if E is a mouse button up event.

 -- Scheme Procedure: mouse-button-event-timestamp e

 -- Scheme Procedure: mouse-button-event-window-id e

 -- Scheme Procedure: mouse-button-event-which e

 -- Scheme Procedure: mouse-button-event-button e

 -- Scheme Procedure: mouse-button-event-pressed? e

 -- Scheme Procedure: mouse-button-event-clicks e

 -- Scheme Procedure: mouse-button-event-x e

 -- Scheme Procedure: mouse-button-event-y e

 -- Scheme Procedure: make-mouse-motion-event timestamp
     window-id
     which
     buttons
     x
     y
     x-rel
     y-rel

 -- Scheme Procedure: mouse-motion-event? e
     Return #t if E is a mouse motion event.

 -- Scheme Procedure: mouse-motion-event-timestamp e

 -- Scheme Procedure: mouse-motion-event-window-id e

 -- Scheme Procedure: mouse-motion-event-which e

 -- Scheme Procedure: mouse-motion-event-buttons e

 -- Scheme Procedure: mouse-motion-event-x e

 -- Scheme Procedure: mouse-motion-event-y e

 -- Scheme Procedure: mouse-motion-event-x-rel e

 -- Scheme Procedure: mouse-motion-event-y-rel e

 -- Scheme Procedure: make-joystick-axis-event timestamp which axis value

 -- Scheme Procedure: joystick-axis-event? e
     Return #t if E is a joystick axis event.

 -- Scheme Procedure: joystick-axis-event-timestamp e

 -- Scheme Procedure: joystick-axis-event-which e

 -- Scheme Procedure: joystick-axis-event-button e

 -- Scheme Procedure: joystick-axis-event-pressed? e

 -- Scheme Procedure: make-joystick-ball-event timestamp
     which
     ball
     x-rel
     y-rel

 -- Scheme Procedure: joystick-ball-event? e
     Return #t if E is a joystick ball event.

 -- Scheme Procedure: joystick-ball-event-timestamp e

 -- Scheme Procedure: joystick-ball-event-which e

 -- Scheme Procedure: joystick-ball-event-ball e

 -- Scheme Procedure: joystick-ball-event-x-rel e

 -- Scheme Procedure: joystick-ball-event-y-rel e

 -- Scheme Procedure: make-joystick-hat-event timestamp which hat value

 -- Scheme Procedure: joystick-hat-event? e
     Return #t if E is a joystick hat event.

 -- Scheme Procedure: joystick-hat-event-timestamp e

 -- Scheme Procedure: joystick-hat-event-which e

 -- Scheme Procedure: joystick-hat-event-hat e

 -- Scheme Procedure: joystick-hat-event-value e

 -- Scheme Procedure: make-joystick-device-event timestamp which action

 -- Scheme Procedure: joystick-device-event? e
     Return #t if E is a joystick device event.

 -- Scheme Procedure: joystick-device-event-timestamp e

 -- Scheme Procedure: joystick-device-event-which e

 -- Scheme Procedure: joystick-device-event-action e

 -- Scheme Procedure: make-controller-axis-event timestamp which axis value

 -- Scheme Procedure: controller-axis-event? e
     Return #t if E is a game controller axis event.

 -- Scheme Procedure: controller-axis-event-timestamp e

 -- Scheme Procedure: controller-axis-event-which e

 -- Scheme Procedure: controller-axis-event-axis e

 -- Scheme Procedure: controller-axis-event-value e

 -- Scheme Procedure: make-controller-button-event timestamp
     which
     button
     pressed?

 -- Scheme Procedure: controller-button-event? e
     Return #t if EVENT is a game controller button event.

 -- Scheme Procedure: controller-button-down-event? e

 -- Scheme Procedure: controller-button-up-event? e

 -- Scheme Procedure: controller-button-event-timestamp e

 -- Scheme Procedure: controller-button-event-which e

 -- Scheme Procedure: controller-button-event-button e

 -- Scheme Procedure: controller-button-event-pressed? e

 -- Scheme Procedure: make-controller-device-event timestamp which action

 -- Scheme Procedure: controller-device-event? e
     Return #t if EVENT is a game controller device event.

 -- Scheme Procedure: controller-added-event? e
     Return #t if EVENT is a game controller device event with the 'added' action.

 -- Scheme Procedure: controller-removed-event? e
     Return #t if EVENT is a game controller device event with the 'removed' action.

 -- Scheme Procedure: controller-remapped-event? e
     Return #t if EVENT is a game controller device event with the 'remapped' action.

 -- Scheme Procedure: controller-device-event-timestamp e

 -- Scheme Procedure: controller-device-event-which e

 -- Scheme Procedure: controller-device-event-action e

 -- Scheme Procedure: poll-event

Rects
=====

     (use-modules (sdl2 rect))

 -- Procedure: make-rect X Y WIDTH HEIGHT
     Return a new rectangle whose upper-left corner is at (X, Y) and is WIDTH pixels wide and HEIGHT pixels high.

 -- Procedure: rect-x RECT
     Return the X coordinate of RECT.

 -- Procedure: rect-y RECT
     Return the Y coordinate of RECT.

 -- Procedure: rect-width RECT
     Return the width of RECT.

 -- Procedure: rect-height RECT
     Return the height of RECT.

Surfaces
========

     (use-modules (sdl2 surface))

 -- Scheme Procedure: color? c
     Return #t if C is a color.

 -- Scheme Procedure: color-r c

 -- Scheme Procedure: color-g c

 -- Scheme Procedure: color-b c

 -- Scheme Procedure: color-a c

 -- Scheme Procedure: palette? p
     Return #t if P is a palette.

 -- Scheme Procedure: palette-length palette
     Return the number of colors in PALETTE.

 -- Scheme Procedure: palette-colors palette
     Return the colors in PALETTE.

 -- Scheme Procedure: pixel-format? pf
     Return #t if PF is a pixel format.

 -- Scheme Procedure: pixel-format-name pf
     Return the symbolic name of the pixel format PF.

 -- Scheme Procedure: pixel-format-palette pf
     Return the palette for the pixel format PF.

 -- Scheme Procedure: pixel-format-bits-per-pixel pf
     Return the number of bits per pixel for the pixel format PF.

 -- Scheme Procedure: pixel-format-bytes-per-pixel pf
     Return the number of bytes per pixel for the pixel format PF.

 -- Scheme Procedure: pixel-format-red-mask pf
     Return the bitmask for the red component of a pixel in the pixel format PF.

 -- Scheme Procedure: pixel-format-green-mask pf
     Return the bitmask for the green component of a pixel in the pixel format PF.

 -- Scheme Procedure: pixel-format-blue-mask pf
     Return the bitmask for the blue component of a pixel in the pixel format PF.

 -- Scheme Procedure: pixel-format-alpha-mask pf
     Return the bitmask for the alpha component of a pixel in the pixel format PF.

 -- Scheme Procedure: make-rgb-surface width height depth
     Create a new SDL surface with the dimensions WIDTH and HEIGHT and DEPTH bits per pixel.

 -- Scheme Procedure: bytevector->surface bv width height depth pitch
     Convert BV, a bytevector of pixel data with dimensions WIDTHxHEIGHT, to an SDL surface.  Each pixel is DEPTH bits in size, and each row of pixels is PITCH bytes in size.

 -- Scheme Procedure: delete-surface! surface
     Free the memory used by SURFACE.

 -- Scheme Procedure: call-with-surface surface proc
     Call PROC, passing it SURFACE and deleting SURFACE upon exit of PROC.

 -- Scheme Procedure: load-bmp file
     Create a new surface from the bitmap data in FILE.

 -- Scheme Procedure: surface-width surface
     Return the width of SURFACE in pixels.

 -- Scheme Procedure: surface-height surface
     Return the height of SURFACE in pixels.

 -- Scheme Procedure: surface-pitch surface
     Return the length of a row of pixels in SURFACE in bytes.

 -- Scheme Procedure: surface-pixels surface
     Return a bytevector containing the raw pixel data in SURFACE.

 -- Scheme Procedure: surface-pixel-format surface
     Return the pixel format for SURFACE.

 -- Scheme Procedure: convert-surface-format surface format
     Convert the pixels in SURFACE to FORMAT, a symbol representing a specific pixel format, and return a new surface object.

     Valid format types are:

       * index1lsb

       * index1msb

       * index4lsb

       * index4msb

       * index8

       * rgb332

       * rgb444

       * rgb555

       * bgr555

       * argb4444

       * rgba4444

       * abgr4444

       * bgra4444

       * argb1555

       * rgba5551

       * abgr1555

       * bgra5551

       * rgb565

       * bgr565

       * rgb24

       * bgr24

       * rgb888

       * rgbx8888

       * bgr888

       * bgrx8888

       * argb8888

       * rgba8888

       * abgr8888

       * bgra8888

       * argb2101010

       * yv12

       * iyuv

       * yuy2

       * uyvy

       * yvyu

 -- Procedure: blit-surface SRC SRC-RECT DST DST-RECT
     Blit the rectangle SRC-RECT from the surface SRC to DST-RECT of the surface DST.

Rendering
=========

     (use-modules (sdl2 render))

 -- Scheme Procedure: make-renderer window
     [#:optional flags='(accelerated vsync)]
     Return a new renderer for WINDOW created with the options specified in FLAGS, a list of symbols.  The valid symbols that may appear in FLAGS are:

       * software, to use a software renderer fallback

       * accelerated, to use hardware acceleration

       * vsync, to synchronize rendering with the monitor's refresh rate

       * texture, for render to texture support

 -- Scheme Procedure: renderer? r
     Return #t if R is a renderer.

 -- Scheme Procedure: delete-renderer! renderer
     Delete the rendering context RENDERER.

 -- Scheme Procedure: call-with-renderer renderer proc
     Call PROC, passing it RENDERER and closing RENDERER upon exit of PROC.

 -- Scheme Procedure: clear-renderer renderer
     Clear the rendering target RENDERER with the current drawing color.

 -- Scheme Procedure: present-renderer renderer
     Display RENDERER.

 -- Scheme Procedure: render-copy renderer
     texture
     [#:srcrect]
     [#:dstrect] Copy TEXTURE to the rendering target of RENDERER.

 -- Scheme Procedure: surface->texture renderer surface
     Convert SURFACE to a texture suitable for RENDERER.

Images
======

     (use-modules (sdl2 image))

 -- Scheme Procedure: image-init
     Initialize dynamically loaded image libraries.

 -- Scheme Procedure: image-quit
     Clean up dynamically loaded image libraries.

 -- Scheme Procedure: load-image file
     Load the image in FILE and return an SDL surface.

 -- Scheme Procedure: save-png surface file
     Save SURFACE to FILE as a PNG formatted image.

Sound
=====

     (use-modules (sdl2 mixer))

 -- Scheme Variable: %default-frequency

 -- Scheme Variable: %default-format

 -- Scheme Variable: %default-chunk-size

 -- Scheme Procedure: mixer-init [#:optional formats='(flac mod modplug mp3 ogg fluidsynth)]
     Initialize mixer library with support for FORMATS, a list of symbols representing audio file formats.  Possible formats are:

       * flac

       * mod

       * modplug

       * mp3

       * ogg

       * fluidsynth

 -- Scheme Procedure: mixer-quit
     Shutdown mixer library.

 -- Scheme Procedure: open-audio [#:frequency=%default-frequency]
     [#:format=%default-format]
     [#:stereo?=#t]
     [#:chunk-size=%default-chunk-size]
     Initialize the mixer API.  FREQUENCY specificies the sample rate in hertz.  When STEREO? is #t, two output channels are used, otherwise mono output is used instead.  CHUNK-SIZE specifies the number of bytes used per output sample.  FORMAT is a symbol that specifies the output sample format.  Possible values are:

       * u8

       * s8

       * u16lsb

       * s16lsb

       * u16msb

       * s16msb

       * u16

       * s16

       * s32lsb

       * s32msb

       * s32

       * f32lsb

       * f32msb

       * f32

 -- Scheme Procedure: close-audio
     Shut down the mixer API.

 -- Scheme Procedure: chunk? c
     Return #t if C is a chunk.

 -- Scheme Procedure: load-chunk file
     Load the audio data in FILE and return an audio chunk.

 -- Scheme Procedure: delete-chunk! chunk
     Free the memory used for CHUNK.

 -- Scheme Procedure: set-chunk-volume! chunk volume
     Set the loudness of CHUNK to VOLUME, an integer in the range [0,128].  Return the previous chunk volume setting.

 -- Scheme Procedure: play-chunk! chunk
     [#:loops=0]
     [#:channel]
     Play CHUNK on CHANNEL, an integer channel identifier or #f to use the first unreserved audio channel.  CHUNK will play LOOPS + 1 times.  Return the channel identifier that CHUNK is played on.

 -- Scheme Procedure: set-channel-volume! channel volume
     Set the loudness of CHANNEL, an integer channel identifier or #f for all channels, to VOLUME, an integer in the range [0,128].  Return the previous volume of CHANNEL, or the average of all channels if CHANNEL is #f.

 -- Scheme Procedure: pause-channel! channel
     Pause playback on CHANNEL, an integer channel identifier, or #f to pause all channels.

 -- Scheme Procedure: resume-channel! channel
     Resume playback on CHANNEL, an integer channel identifier, or #f to resume all channels.

 -- Scheme Procedure: stop-channel! channel
     Halt playback on CHANNEL, an integer channel identifier, or #f to halt all channels.

 -- Scheme Procedure: channel-playing? channel
     Return #t if CHANNEL is playing.

 -- Scheme Procedure: playing-channels-count
     Return the number of channels currently playing.

 -- Scheme Procedure: channel-paused? channel
     Return #t if CHANNEL is paused.

 -- Scheme Procedure: paused-channels-count
     Return the number of channels that are paused.

 -- Scheme Procedure: music? m
     Return #t if M is music.

 -- Scheme Procedure: load-music file
     Load music from FILE.

 -- Scheme Procedure: delete-music! music
     Delete the memory used for MUSIC.

 -- Scheme Procedure: play-music! music [#:optional loops=1]
     Play MUSIC, repeated LOOPS times.  LOOPS may be #f, in which case the music loops indefinitely.

 -- Scheme Procedure: set-music-volume! volume
     Set music loudness to VOLUME, an integer in the range [0,128].  Return the previous volume.

 -- Scheme Procedure: music-volume
     Return the music volume.

 -- Scheme Procedure: pause-music!
     Puase the music.

 -- Scheme Procedure: resume-music!
     Resume music playback.

 -- Scheme Procedure: rewind-music!
     Start music playback from the beginning.  Rewinding is only supported for MOD, OGG, MP3, and native MIDI music.

 -- Scheme Procedure: stop-music!
     Halt music playback.

 -- Scheme Procedure: music-playing?
     Return #t if music is currently playing.

 -- Scheme Procedure: music-paused?
     Return #t if music is currently paused.

Fonts
=====

     (use-modules (sdl2 ttf))

 -- Scheme Procedure: ttf-init
     Initialize the TTF system.

 -- Scheme Procedure: ttf-quit
     Shut down and clean up the TTF system.

 -- Scheme Procedure: load-font file point-size
     Load TTF font from FILE and return a new font object whose glyph size is POINT-SIZE.

 -- Scheme Procedure: delete-font! font
     Delete the memory allocated for FONT.

 -- Scheme Procedure: font-height font
     Return the maximum height of FONT.

 -- Scheme Procedure: render-font-solid font text color
     Render TEXT, a UTF-8 encoded string, using FONT and COLOR, the foreground color, and return a surface containing the results.

 -- Scheme Procedure: render-font-blended font text color
     Render TEXT, a UTF-8 encoded string, using FONT and COLOR, the foreground color, and return a high-quality alpha-blended surface containing the results.