1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78
|
YSetAudioModeValues(3) YLIB FUNCTIONS YSetAudioModeValues(3)
NAME
YSetAudioModeValues - Audio values setting
SYNTAX
#include <Y2/Y.h>
#include <Y2/Ylib.h>
int YSetAudioModeValues(
YConnection *con,
int sample_size,
int channels,
int sample_rate,
int direction,
int allow_fragmenting,
int num_fragments,
int fragment_size
)
ARGUMENTS
con Specifies the pointer to the Y server
connection which was returned from
a prior call to YOpenConnection.
sample_size Specifies the sample size in bits,
valid values are 8 or 16.
channels Specifies the number of channels,
valid values are 1 or 2. That's mono
and stereo respectivly.
sample_rate Specifies the same rate in Hz.
Setting this value to 0 has a special
meaning (see description farther
below).
direction Specifies to play or record, 0
for play and 1 for record. Note that
record has not been fully implmented
yet as of Y2, most Y servers do not
support it!
allow_fragmenting
Specifies whether to allow
fragmenting of buffers (this is an
OSS compliancy option). This should
always be set to 1 (true) to comply
with OSS.
num_fragments Specifies the number of buffer
fragments, a value of 2 is the default.
fragment_size Specifies the size of each buffer
fragment in bytes.
DESCRIPTION
The YSetAudioModeValues function changes the recorder's
Audio to the values specified. Any sound objects
currently being played will be killed and the owning
Y clients will be notified.
If sample_rate is set to 0, then the recorder will be
shelled out. Allowing other direct programs to use the
recorder's devices (DSP device, mixer, etc).
Y clients will not notice any differance, the Y server
will emulate (but not actually perform) normal
operations (including the playing of sound objects).
To unshell the recorder, simply call YSetAudioModeValues
or YChangeAudioModePreset with valid values.
Returns -1 on error/invalid value or 0 on success.
SEE ALSO
YChangeAudioModePreset(3) YGetAudioStats(3)
Y Version 2
|