//driver_raor.c: /* * Copyright (C) Philipp 'ph3-der-loewe' Schafft - 2008 * * 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, 675 Mass Ave, Cambridge, MA 02139, USA. * */ #include "roard.h" // this is to avoid warning messages on platforms // where sizeof(void*) == 8 and szeof(int) == 4 #ifdef __LP64__ #define INSTINT long int #else #define INSTINT int #endif int driver_roar_open_vio(struct roar_vio_calls * inst, char * device, struct roar_audio_info * info, int fh) { if ( fh != -1 ) { // this is a connection to a roard, no roar_simple_*() interface avalible for this case return -1; } if ( (fh = roar_simple_play(info->rate, info->channels, info->bits, info->codec, device, "roard")) == -1 ) { return -1; } roar_vio_set_fh(inst, fh); return 0; } int driver_roar_close(DRIVER_USERDATA_T inst) { return roar_simple_close(roar_vio_get_fh((struct roar_vio_calls *)inst)); } int driver_roar_pause(DRIVER_USERDATA_T inst, int newstate) { return -1; } int driver_roar_flush(DRIVER_USERDATA_T inst) { return 0; } //ll