]> icculus.org git repositories - btb/d2x.git/blob - arch/dos/mm_snd/include/mdma.h
This commit was generated by cvs2svn to compensate for changes in r2,
[btb/d2x.git] / arch / dos / mm_snd / include / mdma.h
1 #ifndef MDMA_H
2 #define MDMA_H
3
4 #include "mtypes.h"
5
6 #define READ_DMA                0
7 #define WRITE_DMA               1
8 #define INDEF_READ              2
9 #define INDEF_WRITE             3
10
11 #ifdef __WATCOMC__
12
13 typedef struct{
14         void *continuous;       /* the pointer to a page-continous dma buffer */
15         UWORD raw_selector;     /* the raw allocated dma selector */
16 } DMAMEM;
17
18 #elif defined(__DJGPP__)
19
20 typedef struct{
21                 void *continuous;       /* the pointer to a page-continous dma buffer */
22                 _go32_dpmi_seginfo raw; /* points to the memory that was allocated */
23 } DMAMEM;
24
25 #else
26
27 typedef struct{
28         void *continuous;       /* the pointer to a page-continous dma buffer */
29         void *raw;                      /* points to the memory that was allocated */
30 } DMAMEM;
31
32 #endif
33
34 DMAMEM *MDma_AllocMem(UWORD size);
35 void    MDma_FreeMem(DMAMEM *dm);
36 int     MDma_Start(int channel,DMAMEM *dm,UWORD size,int type);
37 void    MDma_Stop(int channel);
38 void   *MDma_GetPtr(DMAMEM *dm);
39 void    MDma_Commit(DMAMEM *dm,UWORD index,UWORD count);
40 UWORD   MDma_Todo(int channel);
41
42 #endif