DoAudio (Kernel)

DoAudio manages playback of audio resources. The various subfunctions will be discussed separately.

Important

SCI1.1 only.

DoAudio(audPLAY resourceNumber)
DoAudio(audPLAY moduleNumber noun verb condition sequence)

Starts a digital audio sample. Variations are provided for both audio resources (described by a single resource number) and audio36 resources (described by a module number and a noun/verb/condition/sequence tuple. The latter are used for speech samples associated with message resources.

Parameters:
  • resourceNumber (number) – The resource number.
  • moduleNumber (number) – The module number (room number).
  • noun (number) – The message noun.
  • verb (number) – The message verb.
  • condition (number) – The message condition.
  • sequence (number) – The message sequence number.
Returns:

The sample length in ticks.

Example:

(DoAudio audPLAY 107)
DoAudio(audWPLAY resourceNumber)
DoAudio(audWPLAY moduleNumber noun verb condition sequence)

Loads a digital sample but does not play it. It returns the length of the sample in ticks. This can be useful if some game logic needs to be aware of the length of the audio.

Variations are provided for both audio resources (described by a single resource number) and audio36 resources (described by a module number and a noun/verb/condition/sequence tuple. The latter are used for speech samples associated with message resources.

Parameters:
  • resourceNumber (number) – The resource number.
  • moduleNumber (number) – The module number (room number).
  • noun (number) – The message noun.
  • verb (number) – The message verb.
  • condition (number) – The message condition.
  • sequence (number) – The message sequence number.
Returns:

The sample length in ticks.

Example:

(Timer setTicks: self (DoAudio audWPLAY gRoomNumber noun verb condition seq))
DoAudio(audSTOP)

Stops the currently playing digital audio sample.

DoAudio(audPAUSE)

Pauses the currently playing digital audio sample.

DoAudio(audRESUME)

Resumes the currently playing digital audio sample.

DoAudio(audPOSITION)

Returns the position of the currently playing digital audio sample.

DoAudio(audRATE rate)

Sets the audio rate.

DoAudio(audVOLUME volume)

Sets the volume of the currently playing audio sample.

Parameters:volume (number) – A value between 0 and 127.
DoAudio(audLANGUAGE languageId)

Sets the audio language.

DoAudio(audCD [params...])

Controls the CD-audio functions.