3 Ann Hell Ex Machina - Music Software
4 Copyright (C) 2003/2004 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
40 static arts_stream_t arts
=NULL
;
46 int _out_open_arts(char * file
)
48 /* init library and connect to server */
52 /* only 2 channels seems to be supported */
56 arts
=arts_play_stream(_frequency
, 16, _n_channels
, "annhell");
58 /* can't open stream */
62 return(arts_stream_get(arts
, ARTS_P_PACKET_SIZE
));
66 int _out_write_arts(short int * buffer
, int size
)
68 return(arts_write(arts
, buffer
, size
* sizeof(short int)));
72 int _out_close_arts(void)
82 struct _output_driver _out_driver_arts
=
83 { "arts", NULL
, _out_open_arts
, _out_write_arts
, _out_close_arts
};
85 #else /* CONFOPT_ARTS */
87 struct _output_driver _out_driver_arts
=
88 { "arts", NULL
, NULL
, NULL
, NULL
};
90 #endif /* CONFOPT_ARTS */