Removed noise entering the GUI

This commit is contained in:
fabio.olimpieri 2014-01-11 06:43:58 +00:00
parent 68d6423d5d
commit d85f2a81e6
2 changed files with 14 additions and 2 deletions

View File

@ -174,6 +174,10 @@ void close_sound (void)
uae_sem_destroy (&sound_init_sem); uae_sem_destroy (&sound_init_sem);
uae_sem_destroy (&callback_done_sem); uae_sem_destroy (&callback_done_sem);
have_sound = 0; have_sound = 0;
#ifdef DRIVESOUND
driveclick_free();
#endif
} }
int init_sound (void) int init_sound (void)
@ -195,13 +199,20 @@ int init_sound (void)
void pause_sound (void) void pause_sound (void)
{ {
SDL_PauseAudio (1); SDL_PauseAudio (1);
clearbuffer();
if (in_callback) {
closing_sound = 1;
uae_sem_post (&data_available_sem);
}
} }
void resume_sound (void) void resume_sound (void)
{ {
clearbuffer(); clearbuffer();
SDL_PauseAudio (0); SDL_PauseAudio (0);
closing_sound = 0;
} }
void reset_sound (void) void reset_sound (void)

View File

@ -18,7 +18,8 @@ extern void resume_sound (void);
extern void pause_sound (void); extern void pause_sound (void);
extern void reset_sound (void); extern void reset_sound (void);
extern void driveclick_mix(uae_s16*, int); //Also defined in driveclick.h extern void driveclick_mix(uae_s16*, int); //Also defined in driveclick.h
extern void driveclick_init(void); extern void driveclick_init(void); //Also defined in driveclick.h
extern void driveclick_free(void); //Also defined in driveclick.h
STATIC_INLINE void check_sound_buffers (void) STATIC_INLINE void check_sound_buffers (void)
{ {