sdl_a.cpp (1582B)
1 /* 2 3 TiMidity -- Experimental MIDI to WAVE converter 4 Copyright (C) 1995 Tuukka Toivonen <toivonen@clinet.fi> 5 6 This program is free software; you can redistribute it and/or modify 7 it under the terms of the GNU General Public License as published by 8 the Free Software Foundation; either version 2 of the License, or 9 (at your option) any later version. 10 11 This program is distributed in the hope that it will be useful, 12 but WITHOUT ANY WARRANTY; without even the implied warranty of 13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 GNU General Public License for more details. 15 16 You should have received a copy of the GNU General Public License 17 along with this program; if not, write to the Free Software 18 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 19 20 sdl_a.c 21 22 Functions to output RIFF WAVE format data to a file or stdout. 23 24 */ 25 26 #include "config.h" 27 #include "output.h" 28 29 /* export the playback mode */ 30 31 #define dpm sdl_play_mode 32 33 static int open_output(void); /* 0=success, 1=warning, -1=fatal error */ 34 static void close_output(void); 35 static void output_data(int *buf, int count, int* bytes_written); 36 static void flush_output(void); 37 static void purge_output(void); 38 39 40 PlayMode dpm = { 41 DEFAULT_RATE, PE_16BIT|PE_SIGNED, 42 "SDL audio", 0, "d:\\out.wav", 43 44 open_output, 45 close_output, 46 output_data, 47 flush_output, 48 purge_output 49 }; 50 51 /* Dummies */ 52 static int open_output(void){ 53 return 0; 54 } 55 56 static void output_data(int *buf, int count, int* bytes_written){} 57 static void close_output(void){} 58 static void flush_output(void) { } 59 static void purge_output(void) { }