Query: play_sample
OS: linux
Section: 3alleg4
Format: Original Unix Latex Style Formatted with HTML and a Horizontal Scroll Bar
play_sample(3alleg4) Allegro manual play_sample(3alleg4) NAME
play_sample - Plays a sample. Allegro game programming library. SYNOPSIS
#include <allegro.h> int play_sample(const SAMPLE *spl, int vol, int pan, int freq, int loop); DESCRIPTION
Triggers a sample at the specified volume, pan position, and frequency. The parameters `vol' and `pan' range from 0 (min/left) to 255 (max/right). Frequency is relative rather than absolute: 1000 represents the frequency that the sample was recorded at, 2000 is twice this, etc. If `loop' is not zero, the sample will repeat until you call stop_sample(), and can be manipulated while it is playing by call- ing adjust_sample(). Example: /* Scream from the left speaker, twice the freq. */ int sound = play_sample(scream, 255, 0, 2000, 0); RETURN VALUE
Returns the voice number that was allocated for the sample or negative if no voices were available. SEE ALSO
install_sound(3alleg4), load_sample(3alleg4), adjust_sample(3alleg4), stop_sample(3alleg4), exsample(3alleg4), exsprite(3alleg4) Allegro version 4.4.2 play_sample(3alleg4)
Related Man Pages |
---|
play_sample(3alleg4) - debian |
play_sample(3alleg4) - mojave |
play_sample(3alleg4) - opendarwin |
load_sample(3alleg4) - netbsd |
play_sample(3alleg4) - linux |
Similar Topics in the Unix Linux Community |
---|
Making things run faster |
program in loop. |
Frequency of a range of numbers |