Main Page   Modules   Class Hierarchy   Compound List   File List   Compound Members   File Members  

gui.cpp

00001 /* MuSE - Multiple Streaming Engine
00002  * Copyright (C) 2000-2002 Denis Roio aka jaromil <jaromil@dyne.org>
00003  *
00004  * This source code is free software; you can redistribute it and/or
00005  * modify it under the terms of the GNU Public License as published 
00006  * by the Free Software Foundation; either version 2 of the License,
00007  * or (at your option) any later version.
00008  *
00009  * This source code is distributed in the hope that it will be useful,
00010  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00011  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
00012  * Please refer to the GNU Public License for more details.
00013  *
00014  * You should have received a copy of the GNU Public License along with
00015  * this source code; if not, write to:
00016  * Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00017  */
00018 
00019 #include <stdio.h>
00020 #include <stdlib.h>
00021 #include <string.h>
00022 #include <config.h>
00023 #include <gui.h>
00024 #include <jutils.h>
00025 
00026 #ifdef WITH_DMALLOC
00027 #include <dmalloc.h>
00028 #endif
00029 
00030 GUI::GUI(int argc, char **argv, Stream_mixer *mix) {
00031   //  char temp[512];
00032 
00033   //  sprintf(temp,"%s %s",PACKAGE,VERSION);
00034   //  set_title(temp);
00035 
00036   if(pthread_mutex_init (&_mutex,NULL) == -1)
00037     error("error initializing POSIX thread mutex");
00038   if(pthread_cond_init (&_cond, NULL) == -1)
00039     error("error initializing POSIX thread condtition"); 
00040   
00041   _mix = mix;
00042 
00043   quit = false;
00044   for(int i=0;i<MAX_CHANNELS;i++) {
00045     ch_pos[i] = 0.0;
00046     /* ch_lcd[i] = (char*)malloc(8); */
00047     memset(ch_lcd[i],0,8);
00048   }
00049   
00050 }
00051 
00052 GUI::~GUI() {
00053 
00054   /*
00055   for(int i=0;i<MAX_CHANNELS;i++)
00056     free(ch_lcd[i]);
00057   */
00058 
00059   if(pthread_mutex_destroy(&_mutex) == -1)
00060     error("error destroying POSIX thread mutex");
00061   if(pthread_cond_destroy(&_cond) == -1)
00062     error("error destroying POSIX thread condition");
00063 }

Generated on Sat Apr 17 17:38:48 2004 for MuSE by doxygen1.3