From 25c5eac5e6ca1035db1eddd7bea9ac78531da57e Mon Sep 17 00:00:00 2001 From: David Thompson Date: Thu, 28 Dec 2023 11:23:49 -0500 Subject: Delete manuals! Good riddance! These are hosted on files.dthompson.us now! --- manuals/chickadee/Audio-Files.html | 221 ------------------------------------- 1 file changed, 221 deletions(-) delete mode 100644 manuals/chickadee/Audio-Files.html (limited to 'manuals/chickadee/Audio-Files.html') diff --git a/manuals/chickadee/Audio-Files.html b/manuals/chickadee/Audio-Files.html deleted file mode 100644 index a4d7994..0000000 --- a/manuals/chickadee/Audio-Files.html +++ /dev/null @@ -1,221 +0,0 @@ - - - - - - -Audio Files (The Chickadee Game Toolkit) - - - - - - - - - - - - - - - - - - - -
-

-Next: , Up: Audio   [Contents][Index]

-
-
-

5.4.1 Audio Files

- -

Sound data is represented by a special <audio> data type that -stores not only the audio samples themselves, but metadata such as -sample rate, number of channels, and how many bits are used for each -sample. -

-
-
Procedure: load-audio file-name [#:mode static]
-

Load audio within file-name. The following file formats are -currently supported: -

-
    -
  • WAV -
  • MP3 -
  • Ogg Vorbis -
- -

Audio files can be loaded in two different ways, as indicated by -mode: -

-
    -
  • static: -Load the entire audio file into memory. -
  • stream: -Load chunks of the audio file as needed. -
- -

Generally speaking, sound effects don’t take up much space and should -be loaded statically, but music files are much larger and should use -streaming. Static loading is the default. -

- -
-
Procedure: audio? obj
-

Return #t if obj is an audio object. -

- -
-
Procedure: streaming-audio? audio
-

Return #t if audio uses stream loading. -

- -
-
Procedure: static-audio?
-

Return #t if audio uses static loading. -

- -
-
Procedure: audio-mode audio
-

Return the loading mode for audio, either static or -stream. -

- -
-
Procedure: audio-duration audio
-

Return the duration of audio in seconds. -

- -
-
Procedure: audio-bits-per-sample audio
-

Return the number of bits per sample in audio. -

- -
-
Procedure: audio-channels audio
-

Return the number of channels in audio. -

- -
-
Procedure: audio-sample-rate audio
-

Return the sample rate of audio. -

- -
-
Procedure: audio-play audio [#:pitch 1.0] [#:volume 1.0] [#:min-volume 0.0] [#:max-volume 1.0] [#:max-distance] [#:reference-distance 0.0] [#:rolloff-factor 1.0] [#:cone-outer-volume 0.0] [#:cone-inner-angle 0.0] [#:cone-outer-angle] [#:position (vec3 0.0 0.0 0.0)] [#:velocity (vec3 0.0 0.0 0.0)] [#:direction (vec3 0.0 0.0 0.0)] [#:relative? #f]
-
-

Play audio. There are many, many knobs to tweak that will -affect the sound that comes out of the player’s speakers.: -

-
    -
  • pitch: -Pitch multiplier. The default value of 1.0 means no change in pitch. -
  • volume: -Volume multiplier. The default value of 1.0 means no change in volume. -
  • min-volume: -Minimum volume. -
  • max-volume: -Maximum volume. -
  • max-distance: -Used with the inverse clamped distance model (the default model) to -set the distance where there will no longer be any attenuation of the -source. -
  • reference-distance: -The distance where the volume for the audio would drop by half (before -being influenced by the rolloff factor or maximum distance.) -
  • rolloff-factor: -For slowing down or speeding up the rate of attenuation. The default -of 1.0 means no attenuation adjustment is made. -
  • cone-outer-volume: -The volume when outside the oriented cone. -
  • cone-inner-angle: -Inner angle of the sound cone, in radians. The default value is 0. -
  • cone-outer-angle: -Outer angle of the sound cone, in radians. The default value is 2pi -radians, or 360 degrees. -
  • position: -The source of the sound emitter in 3D space. -
  • velocity: -The velocity of the sound emitter in 3D space. -
  • direction: -The direction of the sound emitter in 3D space. -
  • relative?: -A flag that determines whether the position is in absolute coordinates -or relative to the listener’s location. Absolute coordinates are used -by default. -
- -

For games with basic sound needs (that is to say they don’t need 3D -sound modeling), the only things that really matter are volume -and pitch. -

-
- -
-
-

-Next: , Up: Audio   [Contents][Index]

-
- - - - - -- cgit v1.2.3