annotate src/sdl/SoundDriver.h @ 37:9eae224b8056 recording-sans-reset

reseting the movie does not appear to work
author Robert McIntyre <rlm@mit.edu>
date Mon, 05 Mar 2012 14:51:43 -0600
parents f9f4f1b99eed
children
rev   line source
rlm@1 1 // VisualBoyAdvance - Nintendo Gameboy/GameboyAdvance (TM) emulator.
rlm@1 2 // Copyright (C) 2008 VBA-M development team
rlm@1 3
rlm@1 4 // This program is free software; you can redistribute it and/or modify
rlm@1 5 // it under the terms of the GNU General Public License as published by
rlm@1 6 // the Free Software Foundation; either version 2, or(at your option)
rlm@1 7 // any later version.
rlm@1 8 //
rlm@1 9 // This program is distributed in the hope that it will be useful,
rlm@1 10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
rlm@1 11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
rlm@1 12 // GNU General Public License for more details.
rlm@1 13 //
rlm@1 14 // You should have received a copy of the GNU General Public License
rlm@1 15 // along with this program; if not, write to the Free Software Foundation,
rlm@1 16 // Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
rlm@1 17
rlm@1 18 #ifndef __VBA_SOUND_DRIVER_H__
rlm@1 19 #define __VBA_SOUND_DRIVER_H__
rlm@1 20
rlm@1 21 #include "Types.h"
rlm@1 22
rlm@1 23 /**
rlm@1 24 * Sound driver abstract interface for the core to use to output sound.
rlm@1 25 * Subclass this to implement a new sound driver.
rlm@1 26 */
rlm@1 27 class SoundDriver
rlm@1 28 {
rlm@1 29 public:
rlm@1 30
rlm@1 31 /**
rlm@1 32 * Destructor. Free the resources allocated by the sound driver.
rlm@1 33 */
rlm@1 34 virtual ~SoundDriver() { };
rlm@1 35
rlm@1 36 /**
rlm@1 37 * Initialize the sound driver.
rlm@1 38 * @param sampleRate In Hertz
rlm@1 39 */
rlm@1 40 virtual bool init() = 0;
rlm@1 41
rlm@1 42 /**
rlm@1 43 * Tell the driver that the sound stream has paused
rlm@1 44 */
rlm@1 45 virtual void pause() = 0;
rlm@1 46
rlm@1 47 /**
rlm@1 48 * Reset the sound driver
rlm@1 49 */
rlm@1 50 virtual void reset() = 0;
rlm@1 51
rlm@1 52 /**
rlm@1 53 * Tell the driver that the sound stream has resumed
rlm@1 54 */
rlm@1 55 virtual void resume() = 0;
rlm@1 56
rlm@1 57 /**
rlm@1 58 * Write length bytes of data from the finalWave buffer to the driver output buffer.
rlm@1 59 */
rlm@1 60 virtual void write(u16 * finalWave, int length) = 0;
rlm@1 61
rlm@1 62 virtual bool setThrottle(unsigned short throttle) = 0;
rlm@1 63 };
rlm@1 64
rlm@1 65 #endif // __VBA_SOUND_DRIVER_H__