diff --git a/devices/ioctrl/heathrow.cpp b/devices/ioctrl/heathrow.cpp index aa2ace8..bacc99c 100644 --- a/devices/ioctrl/heathrow.cpp +++ b/devices/ioctrl/heathrow.cpp @@ -69,7 +69,7 @@ HeathrowIC::HeathrowIC() : PCIDevice("mac-io/heathrow"), InterruptCtrl() // find appropriate sound chip, create a DMA output channel for sound, // then wire everything together - this->snd_codec = dynamic_cast(gMachineObj->get_comp_by_type(HWCompType::SND_CODEC)); + this->snd_codec = dynamic_cast(gMachineObj->get_comp_by_type(HWCompType::SND_CODEC)); this->snd_out_dma = std::unique_ptr (new DMAChannel()); this->snd_codec->set_dma_out(this->snd_out_dma.get()); this->snd_out_dma->set_callbacks( diff --git a/devices/ioctrl/macio.h b/devices/ioctrl/macio.h index a19ef82..6cdf3a3 100644 --- a/devices/ioctrl/macio.h +++ b/devices/ioctrl/macio.h @@ -269,7 +269,7 @@ private: uint8_t emmo_pin; // factory tester status, active low // subdevice objects - MacioSndCtrl* snd_codec; // audio codec instance + MacioSndCodec* snd_codec; // audio codec instance NVram* nvram; // NVRAM ViaCuda* viacuda; // VIA cell with Cuda MCU attached to it diff --git a/devices/sound/awacs.cpp b/devices/sound/awacs.cpp index be38ea3..241fc50 100644 --- a/devices/sound/awacs.cpp +++ b/devices/sound/awacs.cpp @@ -123,7 +123,7 @@ void AwacDevicePdm::write_ctrl(uint32_t addr, uint16_t value) } //============================= Screamer AWACs ================================ -AwacsScreamer::AwacsScreamer(std::string name) : AwacsBase(name) +AwacsScreamer::AwacsScreamer(std::string name) : MacioSndCodec(name) { static int screamer_freqs[8] = { 44100, 29400, 22050, 17640, 14700, 11025, 8820, 7350 diff --git a/devices/sound/awacs.h b/devices/sound/awacs.h index e0de8b7..457ea72 100644 --- a/devices/sound/awacs.h +++ b/devices/sound/awacs.h @@ -141,8 +141,9 @@ private: }; /** Sound codec interface with the typical MacIO access. */ -class MacioSndCtrl : public virtual AwacsBase { +class MacioSndCodec : public AwacsBase { public: + MacioSndCodec(std::string name) : AwacsBase(name) {}; virtual uint32_t snd_ctrl_read(uint32_t offset, int size) = 0; virtual void snd_ctrl_write(uint32_t offset, uint32_t value, int size) = 0; }; @@ -152,7 +153,7 @@ public: #define AWAC_REV_SCREAMER 3 /** Screamer sound codec. */ -class AwacsScreamer : public MacioSndCtrl { +class AwacsScreamer : public MacioSndCodec { public: AwacsScreamer(std::string name = "Screamer"); ~AwacsScreamer() = default; diff --git a/devices/sound/burgundy.cpp b/devices/sound/burgundy.cpp index 51aabad..3edac7c 100644 --- a/devices/sound/burgundy.cpp +++ b/devices/sound/burgundy.cpp @@ -29,7 +29,7 @@ along with this program. If not, see . #include #include -BurgundyCodec::BurgundyCodec(std::string name) : AwacsBase(name) +BurgundyCodec::BurgundyCodec(std::string name) : MacioSndCodec(name) { supports_types(HWCompType::SND_CODEC); diff --git a/devices/sound/burgundy.h b/devices/sound/burgundy.h index 0be9346..60a8cf3 100644 --- a/devices/sound/burgundy.h +++ b/devices/sound/burgundy.h @@ -38,7 +38,7 @@ enum { /** Number of internal registers implemented in Burgundy. */ #define BURGUNDY_NUM_REGS 123 -class BurgundyCodec : public MacioSndCtrl { +class BurgundyCodec : public MacioSndCodec { public: BurgundyCodec(std::string name); ~BurgundyCodec() = default;