Difference between revisions of "SCI Kernel Documentation/Sound Functions"

From SCI Wiki
Jump to navigationJump to search
 
Line 29: Line 29:
 
 
 
 
  
xxxxxxx body xxxxxxxx
+
==<br /> Sound Functions ==
 +
 
 +
===<br /> (DoSound InitSound sound) ===
 +
 
 +
<blockquote>
 +
Initialize the sound. Will set handle property of object to the internal sound node.
 +
</blockquote>
 +
 
 +
===<br /> (DoSound PlaySound sound) ===
 +
 
 +
<blockquote>
 +
Plays the sound, if no other higher priority sounds are playing.
 +
</blockquote>
 +
 
 +
===<br /> (DoSound NextSound) ===
 +
 
 +
<blockquote>
 +
Not implemented yet.
 +
</blockquote>
 +
 
 +
===<br /> (DoSound KillSound handle) ===
 +
 
 +
<blockquote>
 +
Kill the sound given in handle.
 +
</blockquote>
 +
 
 +
===<br /> (DoSound SoundOn [soundFlag]) ===
 +
 
 +
<blockquote>
 +
If soundFlag is present, it will either turn on sound output if soundFlag is TRUE or turn off sound output if soundFlag is FALSE. If soundFlag is not present, it will returns TRUE if sound output is on, FALSE otherwise.
 +
</blockquote>
 +
 
 +
===<br /> (DoSound StopSound handle) ===
 +
 
 +
<blockquote>
 +
Stop the sound specified in handle from playing.
 +
</blockquote>
 +
 
 +
===<br /> (DoSound PauseSound value) ===
 +
 
 +
<blockquote>
 +
If value is TRUE, pause all the active sounds and set state to SND_BLOCKED.. If value is FALSE, then unpause all blocked sounds.
 +
</blockquote>
 +
 
 +
===<br /> (DoSound RestoreSound) ===
 +
 
 +
<blockquote>
 +
Loads all sounds in sound list and starts playing the one that is active that has the highest priority.
 +
</blockquote>
 +
 
 +
===<br /> (DoSound ChangeVolume vol) ===
 +
 
 +
<blockquote>
 +
Sets the volume to vol, where vol can be between 0 and 100.
 +
</blockquote>
 +
 
 +
===<br /> (DoSound ChangeSndState soundObj) ===
 +
 
 +
<blockquote>
 +
Change the state of the internal sound node to correspond to the values in soundObj.
 +
</blockquote>
 +
 
 +
===<br /> (DoSound FadeSound handle) ===
 +
 
 +
<blockquote>
 +
On systems with volume control, fade away the sound given in handle. Otherwise, a StopSound is implemented in the music driver.
 +
</blockquote>
 +
 
 +
===<br /> (DoSound NumVoices) ===
 +
 
 +
<blockquote>
 +
Returns the number of voices in the sound hardware.
 +
</blockquote>
  
 
&nbsp;
 
&nbsp;

Latest revision as of 14:19, 3 December 2015

Official SCI Documentation

Chapter: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | Index


Sound Functions

Author: Jeff Stephenson

Revision by: David Slayback

 


Sound Functions


(DoSound InitSound sound)

Initialize the sound. Will set handle property of object to the internal sound node.


(DoSound PlaySound sound)

Plays the sound, if no other higher priority sounds are playing.


(DoSound NextSound)

Not implemented yet.


(DoSound KillSound handle)

Kill the sound given in handle.


(DoSound SoundOn [soundFlag])

If soundFlag is present, it will either turn on sound output if soundFlag is TRUE or turn off sound output if soundFlag is FALSE. If soundFlag is not present, it will returns TRUE if sound output is on, FALSE otherwise.


(DoSound StopSound handle)

Stop the sound specified in handle from playing.


(DoSound PauseSound value)

If value is TRUE, pause all the active sounds and set state to SND_BLOCKED.. If value is FALSE, then unpause all blocked sounds.


(DoSound RestoreSound)

Loads all sounds in sound list and starts playing the one that is active that has the highest priority.


(DoSound ChangeVolume vol)

Sets the volume to vol, where vol can be between 0 and 100.


(DoSound ChangeSndState soundObj)

Change the state of the internal sound node to correspond to the values in soundObj.


(DoSound FadeSound handle)

On systems with volume control, fade away the sound given in handle. Otherwise, a StopSound is implemented in the music driver.


(DoSound NumVoices)

Returns the number of voices in the sound hardware.

 

Notes


 

Table of Contents

 

< Previous: Window and Text Functions Next: Arithmetic Functions >