summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiguel Freitas <miguelfreitas@users.sourceforge.net>2002-05-23 22:50:52 +0000
committerMiguel Freitas <miguelfreitas@users.sourceforge.net>2002-05-23 22:50:52 +0000
commit852a90ecdff60dc195369d84230f613c51a2c907 (patch)
treed3a4efc8876f2f296f2b45a72eecc0f3ebf28afa
parent3773dcd2014ba2cca237ecbec9c7f93888aa2c56 (diff)
downloadxine-lib-852a90ecdff60dc195369d84230f613c51a2c907.tar.gz
xine-lib-852a90ecdff60dc195369d84230f613c51a2c907.tar.bz2
connect to arts server only once and disconnects on exit. this fixes
immediate segfaults with kde3. i'm still experiencing segfaults quiting xine (don't know why - backtrace shows libmcop, perhaps a redhat 7.3 libraries bug) CVS patchset: 1930 CVS date: 2002/05/23 22:50:52
-rw-r--r--src/audio_out/audio_arts_out.c16
1 files changed, 4 insertions, 12 deletions
diff --git a/src/audio_out/audio_arts_out.c b/src/audio_out/audio_arts_out.c
index ce6afe4a4..455cb4bbc 100644
--- a/src/audio_out/audio_arts_out.c
+++ b/src/audio_out/audio_arts_out.c
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*
- * $Id: audio_arts_out.c,v 1.10 2002/04/06 14:19:12 miguelfreitas Exp $
+ * $Id: audio_arts_out.c,v 1.11 2002/05/23 22:50:52 miguelfreitas Exp $
*/
/* required for swab() */
@@ -72,7 +72,6 @@ static int ao_arts_open(ao_driver_t *this_gen,
uint32_t bits, uint32_t rate, int mode)
{
arts_driver_t *this = (arts_driver_t *) this_gen;
- int rc;
printf ("audio_arts_out: ao_open bits=%d rate=%d, mode=%d\n", bits, rate, mode);
@@ -106,12 +105,6 @@ static int ao_arts_open(ao_driver_t *this_gen,
printf ("audio_arts_out: %d channels output\n",this->num_channels);
- if( (rc=arts_init()) != 0 )
- {
- printf("arts_init error: %s\n",arts_error_text(rc));
- return 0;
- }
-
this->audio_stream=arts_play_stream(this->sample_rate, bits, this->num_channels, "xine");
this->latency = arts_stream_get (this->audio_stream, ARTS_P_TOTAL_LATENCY);
@@ -181,7 +174,6 @@ static void ao_arts_close(ao_driver_t *this_gen)
if (this->audio_stream) {
arts_close_stream(this->audio_stream);
- arts_free();
this->audio_stream = NULL;
}
}
@@ -196,6 +188,7 @@ static void ao_arts_exit(ao_driver_t *this_gen)
arts_driver_t *this = (arts_driver_t *) this_gen;
ao_arts_close(this_gen);
+ arts_free();
free (this);
}
@@ -241,7 +234,7 @@ static int ao_arts_set_property (ao_driver_t *this, int property, int value) {
*
*/
static int ao_arts_ctrl(ao_driver_t *this_gen, int cmd, ...) {
- arts_driver_t *this = (arts_driver_t *) this_gen;
+ /*arts_driver_t *this = (arts_driver_t *) this_gen;*/
switch (cmd) {
@@ -271,8 +264,7 @@ ao_driver_t *init_audio_out_plugin (config_values_t *config) {
fprintf(stderr,"audio_arts_out: arts_init failed: %s\n",arts_error_text(rc));
return NULL;
}
- arts_free();
-
+
/*
* set capabilities
*/