void sound_end( void ) { if( sound_enabled ) { delete_Blip_Synth( &left_beeper_synth ); delete_Blip_Synth( &right_beeper_synth ); delete_Blip_Synth( &ay_a_synth ); delete_Blip_Synth( &ay_b_synth ); delete_Blip_Synth( &ay_c_synth ); delete_Blip_Synth( &ay_a_synth_r ); delete_Blip_Synth( &ay_b_synth_r ); delete_Blip_Synth( &ay_c_synth_r ); delete_Blip_Synth( &left_specdrum_synth ); delete_Blip_Synth( &right_specdrum_synth ); delete_Blip_Buffer( &left_buf ); delete_Blip_Buffer( &right_buf ); if( settings_current.sound ) sound_lowlevel_end(); libspectrum_free( samples ); sound_enabled = 0; } }
static void sound_end( CAY8910 *_this ) { #if 0 if( sound_enabled ) { if( sound_buf ) { free( sound_buf ); sound_buf = NULL; free( tape_buf ); tape_buf = NULL; } if( convert_input_buffer ) { free( convert_input_buffer ); convert_input_buffer = NULL; } if( convert_output_buffer ) { free( convert_output_buffer ); convert_output_buffer = NULL; } #ifdef HAVE_SAMPLERATE if( src_state ) src_state = src_delete( src_state ); #endif /* #ifdef HAVE_SAMPLERATE */ sound_lowlevel_end(); sound_enabled = 0; } #endif #if 0 if( sound_buf ) { free( sound_buf ); sound_buf = NULL; } #endif }
int sound_init(void) { if(sound_lowlevel_init(NULL, &sound_freq,&sound_stereo)) { /* XXX a bit vague, maybe I should put this check in sound_init() */ //fprintf(stderr,"z81: warning: " // "couldn't initialise sound device, sound disabled.\n"); return(1); } /* important to override this if not using stereo */ if(!sound_stereo) sound_stereo_acb=0; sound_enabled=1; sound_framesiz=sound_freq/50; if((sound_buf=malloc(sound_framesiz*(sound_stereo+1)))==NULL) { sound_lowlevel_end(); return(1); } sound_oldval=sound_oldval_orig=128; sound_oldpos=-1; sound_fillpos=0; sound_ptr=sound_buf; beeper_tick=0; beeper_tick_incr=(1<<24)/sound_freq; //if(sound_ay) sound_ay_init(); return(0); }
void sound_end(void) { if(sound_enabled) { if(sound_buf) free(sound_buf); sound_lowlevel_end(); sound_enabled=0; } }
void sound_end( void ) { if( sound_enabled ) { delete_Blip_Synth( &left_beeper_synth ); delete_Blip_Buffer( &left_buf ); delete_Blip_Synth( &right_beeper_synth ); delete_Blip_Buffer( &right_buf ); delete_Blip_Synth( &ay_a_synth ); delete_Blip_Synth( &ay_b_synth ); delete_Blip_Synth( &ay_c_synth ); delete_Blip_Synth( &ay_a_synth_r ); delete_Blip_Synth( &ay_b_synth_r ); delete_Blip_Synth( &ay_c_synth_r ); sound_lowlevel_end(); free( samples ); sound_enabled = 0; } }