1voice_set_playmode(3)           Allegro manual           voice_set_playmode(3)
2
3
4

NAME

6       voice_set_playmode  -  Adjusts  the loop status of the specified voice.
7       Allegro game programming library.
8

SYNOPSIS

10       #include <allegro.h>
11
12
13       void voice_set_playmode(int voice, int playmode);
14

DESCRIPTION

16       Adjusts the loop status of the specified voice. This can be done  while
17       the  voice is playing, so you can start a sample in looped mode (having
18       set the loop start and end positions to the  appropriate  values),  and
19       then  clear  the  loop  flag when you want to end the sound, which will
20       cause it to continue past the loop end, play the subsequent part of the
21       sample,  and finish in the normal way. The mode parameter is a bitfield
22       containing the following values:
23
24       PLAYMODE_PLAY
25
26       Plays the sample a single time. This is the default if  you  don't  set
27       the loop flag.
28
29       PLAYMODE_LOOP
30
31       Loops  repeatedly  through  the  sample, jumping back to the loop start
32       position upon reaching the loop end.
33
34       PLAYMODE_FORWARD
35
36       Plays the sample from beginning to end. This  is  the  default  if  you
37       don't set the backward flag.
38
39       PLAYMODE_BACKWARD
40
41       Reverses the direction of the sample. If you combine this with the loop
42       flag, the sample jumps to the loop end position upon reaching the  loop
43       start  (ie.  you  do  not need to reverse the loop start and end values
44       when you play the sample in reverse).
45
46       PLAYMODE_BIDIR
47
48       When used in combination with the  loop  flag,  causes  the  sample  to
49       change  direction  each  time  it reaches one of the loop points, so it
50       alternates between playing forwards and in reverse.
51
52

SEE ALSO

54Allegro                          version 4.4.2           voice_set_playmode(3)
Impressum