All Manuals > CAPI User Guide and Reference Manual > 21 CAPI Reference Entries

NextPrevUpTopContentsIndex

load-sound

Function
Summary

Converts data to a loaded sound object on Microsoft Windows and Cocoa.

Package

capi

Signature

load-sound source &key owner => sound

Arguments

source

A pathname designator or an array returned by read-sound-file.

owner

A CAPI interface, or nil.

Values

sound

An array of element type (unsigned-byte 8).

Description

The function load-sound converts source into a loaded sound which can be played by play-sound.

source can be a pathname designator or an array returned by read-sound-file.

owner should be a CAPI interface object, or nil which means that the sound's owner is the current top level interface.

The loaded sound sound will be unloaded (freed) automatically when its owner is destroyed. To create a sound that is never unloaded, pass the screen as the argument owner .

Notes
  1. The array sound contains the contents of the file. Its bytes are interpreted by the OS functions, so the format can be whatever they can deal with, for example WAV on Microsoft Windows. The fact that this date is represented as an (unsigned-byte 8) array in Lisp does not constrain the output size.
  2. load-sound is not implemented on GTK+ and Motif.
See also

free-sound
play-sound
read-sound-file
Sounds


CAPI User Guide and Reference Manual (Windows version) - 3 Aug 2017

NextPrevUpTopContentsIndex