roar_vs_stream(3) | RoarAudio Programmer's Manual | roar_vs_stream(3) |
roar_vs_stream - Set up stream parameters for VS object
#include <roaraudio.h>
int roar_vs_stream(roar_vs_t * vss, const struct roar_audio_info * info, int dir, int * error);
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.
This function needs to be called before data is read or written if one of the above functions is used to create the VS object.
This function is also used to provide parameters for the file mode (which is started by using roar_vs_file(3) or roar_vs_file_simple(3)). To play back a file this is not needed in a common case as the VS API tries to find correct parameters. It is required for all other stream directions. See roar_vs_file(3) and roar_vs_file_simple(3) for more information.
On failture this function can be called again with different parameters.
On success these calls return 0. On error, -1 is returned.
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.
}
roar_vs_file(3), roar_vs_file_simple(3), roarvs(7), libroar(7), RoarAudio(7).
June 2011 | RoarAudio |