//driver_raw.c: /* * Copyright (C) Philipp 'ph3-der-loewe' Schafft - 2008-2013 * * This file is part of roard a part of RoarAudio, * a cross-platform sound system for both, home and professional use. * See README for details. * * This file is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 3 * as published by the Free Software Foundation. * * RoarAudio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this software; see the file COPYING. If not, write to * the Free Software Foundation, 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301, USA. * */ #include "roard.h" #ifdef ROAR_HAVE_IO_POSIX int driver_raw_open_vio(struct roar_vio_calls * inst, char * device, struct roar_audio_info * info, int fh, struct roar_stream_server * sstream) { ROAR_WARN("The raw driver is obsolete, use dstr driver!"); if ( fh == -1 && device == NULL ) { return -1; } if ( fh == -1 ) { if ( roar_vio_open_file(inst, device, O_CREAT|O_TRUNC|O_WRONLY, 0644) == -1 ) return -1; } else { if ( roar_vio_open_fh(inst, fh) == -1 ) return -1; } return 0; } #endif //ll