2011-01-26 02:29:08 +03:00
|
|
|
/////////////////////////////////////////////////////////////////////////
|
2011-02-25 01:05:47 +03:00
|
|
|
// $Id$
|
2011-01-26 02:29:08 +03:00
|
|
|
/////////////////////////////////////////////////////////////////////////
|
|
|
|
//
|
2015-01-05 00:12:41 +03:00
|
|
|
// Copyright (C) 2011-2015 The Bochs Project
|
2011-01-26 02:29:08 +03:00
|
|
|
//
|
|
|
|
// This library is free software; you can redistribute it and/or
|
|
|
|
// modify it under the terms of the GNU Lesser General Public
|
|
|
|
// License as published by the Free Software Foundation; either
|
|
|
|
// version 2 of the License, or (at your option) any later version.
|
|
|
|
//
|
|
|
|
// This library 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
|
|
|
|
// Lesser General Public License for more details.
|
|
|
|
//
|
|
|
|
// You should have received a copy of the GNU Lesser General Public
|
|
|
|
// License along with this library; if not, write to the Free Software
|
|
|
|
// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
|
|
|
|
2011-03-20 21:02:12 +03:00
|
|
|
// Common code for sound lowlevel modules
|
2011-01-26 02:29:08 +03:00
|
|
|
|
2015-02-17 21:28:25 +03:00
|
|
|
#define BX_MAX_SOUND_DRIVERS 4
|
|
|
|
|
2012-05-20 18:19:49 +04:00
|
|
|
class bx_sound_lowlevel_c;
|
2015-02-13 14:30:46 +03:00
|
|
|
class bx_soundlow_waveout_c;
|
2012-05-20 18:19:49 +04:00
|
|
|
|
2011-02-15 00:14:20 +03:00
|
|
|
// Pseudo device that loads the lowlevel sound module
|
|
|
|
class bx_soundmod_ctl_c : public bx_soundmod_ctl_stub_c {
|
|
|
|
public:
|
2012-05-20 18:19:49 +04:00
|
|
|
bx_soundmod_ctl_c();
|
2013-06-24 23:19:12 +04:00
|
|
|
virtual ~bx_soundmod_ctl_c();
|
|
|
|
virtual void init(void);
|
2015-02-17 21:28:25 +03:00
|
|
|
virtual bx_soundlow_waveout_c* get_waveout(const char *driver);
|
|
|
|
virtual bx_soundlow_wavein_c* get_wavein(const char *driver);
|
|
|
|
virtual bx_soundlow_midiout_c* get_midiout(const char *driver);
|
2013-07-13 21:37:48 +04:00
|
|
|
virtual void VOC_init_file(FILE *stream);
|
|
|
|
virtual void VOC_write_block(FILE *stream, int block, Bit32u headerlen,
|
|
|
|
Bit8u header[], Bit32u datalen, Bit8u data[]);
|
2012-05-20 18:19:49 +04:00
|
|
|
private:
|
2015-02-17 21:28:25 +03:00
|
|
|
bx_sound_lowlevel_c* get_driver(const char *name);
|
|
|
|
|
|
|
|
struct {
|
|
|
|
char name[8];
|
|
|
|
bx_sound_lowlevel_c *module;
|
|
|
|
} soundmod[BX_MAX_SOUND_DRIVERS];
|
|
|
|
unsigned n_sound_drivers;
|
|
|
|
|
2015-02-13 14:30:46 +03:00
|
|
|
bx_soundlow_waveout_c *waveout;
|
2011-02-15 00:14:20 +03:00
|
|
|
};
|