Site Tools


documentation:development:opera:pf25:ppgfldr:smmfldr:gspfldr:12pgs056

ta_customdelay

Demonstrates a delay line attachment.

Synopsis

ta_customdelay [<sample file> [<delay ticks>]]

Description

Demonstrates how to create and use a delay line to get real-time echo effects in your program. Loads the specified AIFF file and plays it into a delay line. By tweaking the knobs on the output mixer, you can control the mix of delay sound versus original sound, and the speed at which the echo will die down.

Arguments

  • sample file Name of an AIFF file to play.
  • delay ticks Amount of time, in audio clock ticks, to hold each note. Defaults to 240 ticks.

Caveats

SleepAudioTicks() is an inefficient way to delay a program, and it is used in this program's PlayPitchNote() function. Avoid or rewrite the PlayPitchNote() function for performance-critical code.

Associated Files

ta_customdelay.c

Location

examples/Audio

documentation/development/opera/pf25/ppgfldr/smmfldr/gspfldr/12pgs056.txt · Last modified: 2022/10/10 16:53 by 127.0.0.1