Table of Contents

tsp_algorithmic

Advanced sound player example showing algorithmic sequencing of sound playback.

Synopsis

tsp_algorithmic

Description

Assume you have two short sounds in memory and one long sound file with the following markers:

END

Given this, algorithmically play the following sequence of sounds:

The technique used to implement this sequence involves the use of static branches, where one segment always leads into another, (e.g. after playing the 1st ending always go back to the loop segment), and decision functions where a conditional branching is required (e.g. from the end of the loop segment either go to the 1st or 2nd ending).

This also demonstrates using sounds spooled from disc and played directly from memory.

Associated Files

tsp_algorithmic.c

$samples, words.aiff

Location

examples/Audio/Advanced_Sound_Player

See Also

spCreatePlayer, ./12PGS073.html#XREF12413">tsp_switcher, ./12PGS071.html#XREF30384">tsp_rooms