A/V Control Commands

From pinHeck Wiki
Revision as of 18:00, 21 September 2014 by Benheck (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

These are the commands you call from the main game kernel to control the Propeller A/V. Most commands do not return a value unless noted.



playSFX(which channel, which folder, clip0, clip1, priority)

Example:

playSFX(0, 'B', 'A', 'A', 255);

Plays audio file "BAA.wav" from the SFX/_FB folder on Channel 0 at top Priority.


Use channels 0-2. Channel 3 is reversed for music (usually always playing)

If a sound file is currently playing on Channel 0 at a higher priority than an incoming sound, then the new sound will not play. What I tend to do is use channel 0 for voice prompts, channel 1 for mid-table sound effects (targets, slings etc) and channel 2 for back of the table sounds (pop bumpers and rollovers) This helps "space out" the sounds during a multiball.

As an example, run your normal pop bumper sound on channel 2 with a priority of 250. Then, if you have a "Super Pops" sound or callout, use the same channel but with a priority of 255. Reason for this is let's say you get 50 pops and it says "SUPER POPS!" Now you'll probably get additional pop hits while this voice plays. By calling the voice at 255, and the pops at 250, it ensures the normal pop sound won't override the voice prompt until the priority 255 voice prompt finishes.

It might be tempting to avoid this by using different channels all the time, but the problem there is you may have voices overlapping which sounds bad.