|
|
1.1 root 1: /*
1.1.1.4 root 2: Hatari - sound.h
3:
1.1.1.13 root 4: This file is distributed under the GNU General Public License, version 2
5: or at your option any later version. Read the file gpl.txt for details.
1.1.1.9 root 6:
7: Matthias Arndt 2008-08-15
8: - cleanup to have definitions and declarations for both sound cores in one place
1.1 root 9: */
10:
1.1.1.3 root 11: #ifndef HATARI_SOUND_H
12: #define HATARI_SOUND_H
13:
14:
1.1.1.9 root 15: /* definitions common for all sound rendering engines */
16:
1.1.1.10 root 17: #define MIXBUFFER_SIZE 16384 /* Size of circular buffer to store sample to (44Khz) */
1.1 root 18:
1.1.1.10 root 19: extern Uint8 SoundRegs[ 14 ]; /* store YM regs 0 to 13 */
1.1.1.9 root 20: extern int nGeneratedSamples;
21: extern bool bEnvelopeFreqFlag;
22: extern Sint16 MixBuffer[MIXBUFFER_SIZE][2];
1.1.1.11 root 23: extern bool Sound_BufferIndexNeedReset;
1.1.1.9 root 24:
25: /* STSound sound renderer active */
26: #include <SDL_types.h>
27:
28:
29: /* Internal data types */
30:
31: typedef Sint64 yms64;
32:
33: typedef Sint8 yms8;
34: typedef Sint16 yms16;
35: typedef Sint32 yms32;
1.1.1.3 root 36:
1.1.1.9 root 37: typedef Uint8 ymu8;
38: typedef Uint16 ymu16;
39: typedef Uint32 ymu32;
40:
41: typedef yms16 ymsample; /* Output samples are mono 16bits signed PCM */
42:
43:
44: #define YM_LINEAR_MIXING 1 /* Use ymout1c5bit[] to build ymout5[] */
45: #define YM_TABLE_MIXING 2 /* Use volumetable_original to build ymout5[] */
1.1.1.12 root 46: #define YM_MODEL_MIXING 3 /* Use circuit analysis model to build ymout5[] */
1.1.1.9 root 47:
48: extern int YmVolumeMixing;
1.1.1.14! root 49:
! 50: #define YM2149_LPF_FILTER_NONE 0
! 51: #define YM2149_LPF_FILTER_LPF_STF 1
! 52: #define YM2149_LPF_FILTER_PWM 2
! 53: extern int YM2149_LPF_Filter;
! 54:
! 55: #define YM2149_HPF_FILTER_NONE 0
! 56: #define YM2149_HPF_FILTER_IIR 1
! 57: extern int YM2149_HPF_Filter;
! 58:
! 59: #define YM2149_RESAMPLE_METHOD_NEAREST 0
! 60: #define YM2149_RESAMPLE_METHOD_WEIGHTED_AVERAGE_2 1
! 61: #define YM2149_RESAMPLE_METHOD_WEIGHTED_AVERAGE_N 2
! 62: extern int YM2149_Resample_Method;
! 63:
1.1 root 64:
65: extern void Sound_Init(void);
66: extern void Sound_Reset(void);
1.1.1.7 root 67: extern void Sound_ResetBufferIndex(void);
1.1.1.9 root 68: extern void Sound_MemorySnapShot_Capture(bool bSave);
1.1.1.11 root 69: extern void Sound_Update(bool FillFrame);
1.1 root 70: extern void Sound_Update_VBL(void);
1.1.1.9 root 71: extern void Sound_WriteReg( int reg , Uint8 data );
72: extern bool Sound_BeginRecording(char *pszCaptureFileName);
1.1.1.6 root 73: extern void Sound_EndRecording(void);
1.1.1.9 root 74: extern bool Sound_AreWeRecording(void);
1.1.1.11 root 75: extern void Sound_SetYmVolumeMixing(void);
1.1.1.12 root 76: extern ymsample Subsonic_IIR_HPF_Left(ymsample x0);
77: extern ymsample Subsonic_IIR_HPF_Right(ymsample x0);
1.1.1.9 root 78:
1.1.1.3 root 79:
80: #endif /* HATARI_SOUND_H */
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.