~ubuntu-branches/debian/jessie/scummvm/jessie

« back to all changes in this revision

Viewing changes to engines/kyra/sound_intern.h

  • Committer: Bazaar Package Importer
  • Author(s): Moritz Muehlenhoff
  • Date: 2010-05-07 18:57:09 UTC
  • mto: This revision was merged to the branch mainline in revision 18.
  • Revision ID: james.westby@ubuntu.com-20100507185709-34v8yycywjrou5o3
Tags: upstream-1.1.1
ImportĀ upstreamĀ versionĀ 1.1.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
 * along with this program; if not, write to the Free Software
19
19
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
20
20
 *
21
 
 * $URL: https://scummvm.svn.sourceforge.net/svnroot/scummvm/scummvm/tags/release-1-0-0/engines/kyra/sound_intern.h $
22
 
 * $Id: sound_intern.h 42564 2009-07-17 13:50:59Z lordhoto $
 
21
 * $URL: https://scummvm.svn.sourceforge.net/svnroot/scummvm/scummvm/tags/release-1-1-1/engines/kyra/sound_intern.h $
 
22
 * $Id: sound_intern.h 46194 2009-11-29 13:52:02Z lordhoto $
23
23
 *
24
24
 */
25
25
 
37
37
 
38
38
namespace Audio {
39
39
class PCSpeaker;
40
 
} // end of namespace Audio
 
40
class MaxTrax;
 
41
} // End of namespace Audio
41
42
 
42
43
namespace Kyra {
43
44
class MidiOutput;
128
129
        void metaEvent(byte type, byte *data, uint16 length) {}
129
130
 
130
131
        void setTimerCallback(void *timerParam, void (*timerProc)(void *)) { }
131
 
        uint32 getBaseTempo(void);
 
132
        uint32 getBaseTempo();
132
133
 
133
134
        //Channel allocation functions
134
 
        MidiChannel *allocateChannel()          { return 0; }
135
 
        MidiChannel *getPercussionChannel()     { return 0; }
 
135
        MidiChannel *allocateChannel()      { return 0; }
 
136
        MidiChannel *getPercussionChannel() { return 0; }
136
137
 
137
138
        static float calculatePhaseStep(int8 semiTone, int8 semiToneRootkey,
138
 
                uint32 sampleRate, uint32 outputRate, int32 pitchWheel);
 
139
            uint32 sampleRate, uint32 outputRate, int32 pitchWheel);
139
140
 
140
141
private:
141
142
        bool loadInstruments();
169
170
        bool init();
170
171
 
171
172
        void process() {}
172
 
        void loadSoundFile(uint file) {}
173
 
        void loadSoundFile(Common::String) {}
 
173
        void loadSoundFile(uint file);
 
174
        void loadSoundFile(Common::String file);
174
175
 
175
176
        void playTrack(uint8 track);
176
177
        void haltTrack();
284
285
        static const uint8 _noteTable2[];
285
286
};
286
287
 
287
 
} // end of namespace Kyra
 
288
// for StaticResource (maybe we can find a nicer way to handle it)
 
289
struct AmigaSfxTable {
 
290
        uint8 note;
 
291
        uint8 patch;
 
292
        uint16 duration;
 
293
        uint8 volume;
 
294
        uint8 pan;
 
295
};
 
296
 
 
297
class SoundAmiga : public Sound {
 
298
public:
 
299
        SoundAmiga(KyraEngine_v1 *vm, Audio::Mixer *mixer);
 
300
        ~SoundAmiga();
 
301
 
 
302
        virtual kType getMusicType() const { return kAmiga; } //FIXME
 
303
 
 
304
        bool init();
 
305
 
 
306
        void process() {}
 
307
        void loadSoundFile(uint file);
 
308
        void loadSoundFile(Common::String) {}
 
309
 
 
310
        void playTrack(uint8 track);
 
311
        void haltTrack();
 
312
        void beginFadeOut();
 
313
 
 
314
        int32 voicePlay(const char *file, Audio::SoundHandle *handle, uint8 volume, bool isSfx) { return -1; }
 
315
        void playSoundEffect(uint8);
 
316
 
 
317
protected:
 
318
        Audio::MaxTrax *_driver;
 
319
        Audio::SoundHandle _musicHandle;
 
320
        enum FileType { kFileNone = -1, kFileIntro = 0, kFileGame = 1, kFileFinal = 2 } _fileLoaded;
 
321
 
 
322
        const AmigaSfxTable *_tableSfxIntro;
 
323
        int _tableSfxIntro_Size;
 
324
 
 
325
        const AmigaSfxTable *_tableSfxGame;
 
326
        int _tableSfxGame_Size;
 
327
};
 
328
 
 
329
} // End of namespace Kyra
288
330
 
289
331
#endif
290