/* * This file is part of zaniWok. * * zaniWok is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2, or (at your option) * any later version. See the file COPYING for more information. * * zaniWok is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. */ #include "execute.h" #ifdef USE21 #include #else #include #endif #include /* Numeric type same size as a sample frame */ typedef long Sample; typedef struct { int speaker_is_on; long base_sample; long last_sample; int buf_size; Sample *buf; int samples_queued; int tag; mutex_t lock; } SpeakerState; extern SpeakerState *init_speaker (void); extern void check_flush_speaker (SpeakerState *s); extern int click_speaker (AccessType mode, MemoryElement *m, MachineState *state);