GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  PLAY_SAMPLE (3)

NAME

play_sample - Plays a sample. Allegro game programming library.

CONTENTS

Synopsis
Description
See Also

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 calling 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(3), load_sample(3), adjust_sample(3), stop_sample(3), exsample(3), exsprite(3)
Search for    or go to Top of page |  Section 3 |  Main Index


Allegro PLAY_SAMPLE (3) version 4.4.2

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.