3 Ann Hell Ex Machina - Music Software
4 Copyright (C) 2003/2005 Angel Ortega <angel@triptico.com>
6 out_arts.c - Output driver for libartsc (aRtsd client)
8 This program is free software; you can redistribute it and/or
9 modify it under the terms of the GNU General Public License
10 as published by the Free Software Foundation; either version 2
11 of the License, or (at your option) any later version.
13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
18 You should have received a copy of the GNU General Public License
19 along with this program; if not, write to the Free Software
20 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
22 http://www.triptico.com
30 #include "ss_output.h"
41 static arts_stream_t arts
=NULL
;
47 int _out_open_arts(char * file
)
49 /* init library and connect to server */
53 /* only 2 channels seems to be supported */
57 arts
=arts_play_stream(ss_frequency
, 16, ss_nchannels
, "annhell");
59 /* can't open stream */
63 return(arts_stream_get(arts
, ARTS_P_PACKET_SIZE
));
67 int _out_write_arts(short int * buffer
, int size
)
69 return(arts_write(arts
, buffer
, size
* sizeof(short int)));
73 int _out_close_arts(void)
83 struct _output_driver _out_driver_arts
=
84 { "arts", NULL
, _out_open_arts
, _out_write_arts
, _out_close_arts
};
86 #else /* CONFOPT_ARTS */
88 struct _output_driver _out_driver_arts
=
89 { "arts", NULL
, NULL
, NULL
, NULL
};
91 #endif /* CONFOPT_ARTS */