Difference between revisions of "SciAudio"

From SCI Wiki
Jump to navigationJump to search
Line 109: Line 109:
 
playXFadeOutMillisecs
 
playXFadeOutMillisecs
 
<blockquote>Only used for the 'playx' command.  Upon terminating any currently playing sounds for a sound class, this value will be used for the fade out.
 
<blockquote>Only used for the 'playx' command.  Upon terminating any currently playing sounds for a sound class, this value will be used for the fade out.
 +
</blockquote>
 
</blockquote>
 
</blockquote>
 
</blockquote>
 
</blockquote>

Revision as of 21:12, 29 March 2016

sciAudio
{{{Image}}}
Latest Version:  1.1
Release Date:  Oct. 20, 2012
Company: {{{Company}}}
Publication Status:  {{{Published}}}
Developer(s): Template:Gumby
Language: C#
Open Source: {{{OpenSource}}}
Source Available:  {{{Source}}}
License: {{{License}}}
Platform: Template:WindowsTool
Type: Mod Tool
Localization: English
Website:


sciAudio

Version 1.1

Author: Gumby




Description

sciAudio is here! Check out the "LockerGnome Quest Redux" demo game to see it in action!

Announcement here: http://sciprogramming.com/community/index.php?topic=634.0


Features

  • Playback of WAV and MP3 files
  • Unlimited number of sounds playing simultaneously
  • Fade in/out, looping and volume control
  • Classification of sounds for playback management
  • Multiple commands may be issued simultaneously to the 'controller' file
  • Multiple controller files to avoid resource contention
  • Runs hidden in background & will terminate itself shortly upon game close
  • Calls to sciAudio are performed very similarly to the built-in SCI sound calls
  • Poor man's encryption (MP3's only) - simply rename your .MP3 to be .sciAudio
  • Log file for troubleshooting sound playback ('sciAudio.log' located in same directory as sciAudio.exe)

 

Limitations

Works only in Windows (requires .NET framework)


Usage


Setup

  1. Place the 2 nAudio DLLs & executable into a subfolder within your game named 'sciAudio'
  2. Create subfolders within sciAudio for your playback files. Something like this

    <gamedir>\sciAudio\effects
    <gamedir>\sciAudio\music

  3. Include the sciAudio.sc script & 'use' it in any script you wish to have sciAudio playback in


Available commands

command <playback command>

play

Begins playback of a sound

stop

Stops playback of a sound

change

Changes playback of a sound. Used primarily for volume & loop control, very limited usefulness.

playx (play exclusively based on sound class)

This behaves just like the 'play' command, but will stop any currently playing sounds with the same sound class as the specified class.

fileName

Filename to playback, including the path.

soundClass

Sound class to assign this sound. This is simply a string to assign to the playback for the purpose of potentially changing or terminating all sounds with the same sound class at a later time.

For example, you might have several sound effects playing simultaneously in a room. Upon leaving the room, you want to stop all the sound effects. To to this you would issue a stop <soundclass> command, which would stop all currently playing sounds with the specified sound class.

If no sound class is specified, a default sound class of "noClass" will be used

volume

Playback volume of sample. Default is 100 (100% volume of sample). Range: 0 to ~300?

fadeInMillisecs

Number of milliseconds to fade in the sample

fadeOutMillisecs

Number of milliseconds to fade out a sample. Can be issued with a play or stop command

loopFadeInMillisecs

Number of milliseconds to fade in a sample between loops.

loopFadeOutMillisecs

Number of milliseconds to fade out a sample between loops.

loopCount

Number of times to loop the sample. Default is 0, -1 is infinite

conductorFile

'Conductor' file name used to place commands into. This is how commands are passed between the SCI virtual machine & the sciAudio application. The sciAudio application constantly polls all conductor files, looking for changes & executes them. These files must have extension of .con.

The default value for this parameter is command.con.

Utilization of this parameter is useful in the event you have many near-simultaneous playback commands issued from within your game. Multiple different conductor files can mitigate the issue of potential file contention of just using a single file. Most game developers will probably not need to use this option.

playXFadeOutMillisecs

Only used for the 'playx' command. Upon terminating any currently playing sounds for a sound class, this value will be used for the fade out.


Download

Download from here (source included):


Also See