Mercurial > vba-clojure
view src/sdl/SoundDriver.h @ 104:d2e00ea31508
checking in continue!, which let's the GB run for an unlimited time.
author | Robert McIntyre <rlm@mit.edu> |
---|---|
date | Tue, 13 Mar 2012 00:03:02 -0500 |
parents | f9f4f1b99eed |
children |
line wrap: on
line source
1 // VisualBoyAdvance - Nintendo Gameboy/GameboyAdvance (TM) emulator.2 // Copyright (C) 2008 VBA-M development team4 // This program is free software; you can redistribute it and/or modify5 // it under the terms of the GNU General Public License as published by6 // the Free Software Foundation; either version 2, or(at your option)7 // any later version.8 //9 // This program is distributed in the hope that it will be useful,10 // but WITHOUT ANY WARRANTY; without even the implied warranty of11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the12 // GNU General Public License for more details.13 //14 // You should have received a copy of the GNU General Public License15 // along with this program; if not, write to the Free Software Foundation,16 // Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.18 #ifndef __VBA_SOUND_DRIVER_H__19 #define __VBA_SOUND_DRIVER_H__21 #include "Types.h"23 /**24 * Sound driver abstract interface for the core to use to output sound.25 * Subclass this to implement a new sound driver.26 */27 class SoundDriver28 {29 public:31 /**32 * Destructor. Free the resources allocated by the sound driver.33 */34 virtual ~SoundDriver() { };36 /**37 * Initialize the sound driver.38 * @param sampleRate In Hertz39 */40 virtual bool init() = 0;42 /**43 * Tell the driver that the sound stream has paused44 */45 virtual void pause() = 0;47 /**48 * Reset the sound driver49 */50 virtual void reset() = 0;52 /**53 * Tell the driver that the sound stream has resumed54 */55 virtual void resume() = 0;57 /**58 * Write length bytes of data from the finalWave buffer to the driver output buffer.59 */60 virtual void write(u16 * finalWave, int length) = 0;62 virtual bool setThrottle(unsigned short throttle) = 0;63 };65 #endif // __VBA_SOUND_DRIVER_H__