Update Chocolate Setup to support chex.wad.
[chocolate-doom.git] / pcsound / pcsound.h
blobe64796b843adf089fe00940bbc94f19d87812778
1 // Emacs style mode select -*- C++ -*-
2 //-----------------------------------------------------------------------------
3 //
4 // Copyright(C) 2007 Simon Howard
5 //
6 // This program is free software; you can redistribute it and/or
7 // modify it under the terms of the GNU General Public License
8 // as published by the Free Software Foundation; either version 2
9 // of the License, or (at your option) any later version.
11 // This program is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 // GNU General Public License for more details.
16 // You should have received a copy of the GNU General Public License
17 // along with this program; if not, write to the Free Software
18 // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
19 // 02111-1307, USA.
21 // DESCRIPTION:
22 // PC speaker interface.
24 //-----------------------------------------------------------------------------
26 #ifndef PCSOUND_H
27 #define PCSOUND_H
29 typedef void (*pcsound_callback_func)(int *duration, int *frequency);
31 // Initialise the PC speaker subsystem. The given function is called
32 // periodically to request more sound data to play.
34 int PCSound_Init(pcsound_callback_func callback_func);
36 // Shut down the PC speaker subsystem.
38 void PCSound_Shutdown(void);
40 // Set the preferred output sample rate when emulating a PC speaker.
41 // This must be called before PCSound_Init.
43 void PCSound_SetSampleRate(int rate);
45 #endif /* #ifndef PCSOUND_H */