table of contents
roar_vs_stream(3) | RoarAudio Programmer's Manual | roar_vs_stream(3) |
NAME¶
roar_vs_stream - Set up stream parameters for VS objectSYNOPSIS¶
#include <roaraudio.h>DESCRIPTION¶
This function asks a VS object opened by roar_vs_new_from_con(3) or roar_vs_new(3) to open the data connection using the audio parameters info and the stream direction dir.PARAMETERS¶
- vss
- The VS object to be updated.
- info
- This is a pointer to the roar_audio_info structure storing
the audio format parameters. The structure contains the following
memebers: rate (sample rate), bits (bits per sample), channels (channels
per frame) and codec.
- dir
- This is the stream direction. Common values include
ROAR_DIR_PLAY for waveform playback, ROAR_DIR_MONITOR for waveform
monitoring, ROAR_DIR_RECORD for waveform recording. For MIDI
ROAR_DIR_MIDI_IN and ROAR_DIR_MIDI_OUT is used.
- error
- This is a pointer to a integer used to store the error
value in case of error. This can be NULL if not used but it is very
recommended to use this error value to report good error messages to the
user.
RETURN VALUE¶
On success these calls return 0. On error, -1 is returned.EXAMPLES¶
struct roar_audio_info info;
int err;
if ( roar_profile2info(&info, "isdn-eu") == -1 ) {
// error handling.
}
if ( roar_vs_stream(vss, &info, ROAR_DIR_PLAY, &err) == -1 ) {
// error handling.
}
SEE ALSO¶
roar_vs_file(3), roar_vs_file_simple(3), roarvs(7), libroar(7), RoarAudio(7).June 2011 | RoarAudio |