1 #ifndef DEVICES_AUDIO_H 2 #define DEVICES_AUDIO_H 3 4 /* 5 audio.device include 6 7 Copyright © 2002 The MorphOS Development Team, All Rights Reserved. 8 */ 9 10 #ifndef EXEC_IO_H 11 # include <exec/io.h> 12 #endif 13 14 #pragma pack(2) 15 16 17 #define AUDIONAME "audio.device" 18 19 #define ADHARD_CHANNELS 4 20 21 #define ADALLOC_MINPREC -128 22 #define ADALLOC_MAXPREC 127 23 24 #define ADCMD_FREE (CMD_NONSTD + 0) 25 #define ADCMD_SETPREC (CMD_NONSTD + 1) 26 #define ADCMD_FINISH (CMD_NONSTD + 2) 27 #define ADCMD_PERVOL (CMD_NONSTD + 3) 28 #define ADCMD_LOCK (CMD_NONSTD + 4) 29 #define ADCMD_WAITCYCLE (CMD_NONSTD + 5) 30 #define ADCMD_ALLOCATE 32 31 32 #define ADIOB_PERVOL 4 33 #define ADIOF_PERVOL (1<<ADIOB_PERVOL) 34 #define ADIOB_SYNCCYCLE 5 35 #define ADIOF_SYNCCYCLE (1<<ADIOB_SYNCCYCLE) 36 #define ADIOB_NOWAIT 6 37 #define ADIOF_NOWAIT (1<<ADIOB_NOWAIT) 38 #define ADIOB_WRITEMESSAGE 7 39 #define ADIOF_WRITEMESSAGE (1<<ADIOB_WRITEMESSAGE) 40 41 #define ADIOERR_NOALLOCATION -10 42 #define ADIOERR_ALLOCFAILED -11 43 #define ADIOERR_CHANNELSTOLEN -12 44 45 46 struct IOAudio 47 { 48 struct IORequest ioa_Request; 49 WORD ioa_AllocKey; 50 UBYTE *ioa_Data; 51 ULONG ioa_Length; 52 UWORD ioa_Period; 53 UWORD ioa_Volume; 54 UWORD ioa_Cycles; 55 struct Message ioa_WriteMsg; 56 }; 57 58 59 #pragma pack() 60 61 #endif /* DEVICES_AUDIO_H */