Up: GEOS SDK TechDocs| Up | Prev: SocketLoadType ... | Next: SpecWidth ...

SoundPlayFlags

typedef WordFlags SoundPlayFlags;
#define SPF_HIGH_PRIORITY				0x8000

 

SoundPriority

typedef enum {
 SP_SYSTEM_LEVEL=10, 				/* most urgent */
 SP_ALARM=20,
 SP_STANDARD=30,
 SP_GAME=40,
 SP_BACKGROUND=50 				/* least urgent */
} SoundPriority;
 
#define SP_IMMEDIATE 			-1
#define SP_THEME 			+1

If the user's sound device can't play all requested sounds, it will use SoundPriority values to determine which sounds are the most important.

The highest priority sound you may construct using these values is (SP_SYSTME_LEVEL + SP_IMMEDIATE). The least priority sound would be (SP_BACKGROUND + SP_THEME).

SoundStreamDeltaTimeType

typedef enum {
 SSDTT_MSEC=8, 				/* wait for N mili seconds */
 SSDTT_TICKS=10, 				/* wait for N ticks */
 SSDTT_TEMPO=12, 				/* wait for N beats */
} SoundStreamDeltaTimeType;
/* The following macros may help when constructing music buffers */
#define DeltaTick(time)  				SSDTT_TICKS, time
#define DeltaMS(time)  				SSDTT_MSEC, time
#define DeltaTempo(time) 				SSDTT_TEMPO, time
 

These are the units by which you can specify a sound's duration: milliseconds, timer "ticks" (each 1/60 second), or by means of an independently supplied tempo.

SoundStreamEvents

typedef enum {
 SSE_VOICE_ON=0, 				/* turn on voice event */
 SSE_VOICE_OFF=2, 				/* turn off voice event */
 SSE_CHANGE=4, 				/* change instrument */
 SSE_GENERAL=6 				/* system-specific event */
} SoundStreamEvents;
/* The following macros may help when constructing music buffers */
#define General(command)  SSE_GENERAL, command
 
#define Rest(duration)  General(GE_NO_EVENT), DeltaTick(duration)
 
#define VoiceOn(voice,freq,attack)  SSE_VOICE_ON, voice, freq, attack
#define VoiceOff(voice) SSE_VOICE_OFF, voice
#define ChangeEnvelope(voice, instrument, table)  \
					SSE_CHANGE, voice, instrument, table
 
#define SoundNote(voice,freq,duration,attack)  \
	VoiceOn(voice, freq, attack), DeltaTempo(duration), VoiceOff(voice)
#define Staccato(voice,freq,duration,attack) \
 	VoiceOn(voice, freq, attack), DeltaTempo(((duration*0x03)/0x04)), \
 	VoiceOff(voice), DeltaTempo((duration/0x4))
#define Natural(voice,freq,duration,attack) \
	VoiceOn(voice, freq, attack), DeltaTempo(((duration*0x07)/0x08)),
	VoiceOff(voice), DeltaTempo((duration/0x8))
#define Legato(voice,freq,duration,attack)  \
	SoundNote(voice, freq, duration, attack)

These are the "events" that make up a music buffer.

SoundStreamSize

typedef word SoundStreamSize;
#define SSS_ONE_SHOT 128 /* 128 bytes (very small) */
#define SSS_SMALL 256 /* 256 bytes */
#define SSS_MEDIUM 512 /* 512 bytes (nice size) */
#define SSS_LARGE 1024 

 

SpecHeight

typedef WordFlags SpecHeight;
#define SH_TYPE				0x8c00
#define SH_DATA				0x03ff

 

SpecSizeSpec

typedef WordFlags SpecSizeSpec;
#define SSS_TYPE				0x8c00
#define SSS_DATA				0x03ff

 

SpecSizeType

typedef ByteEnum SpecSizeType;
#define SST_PIXELS						0x0000
#define SST_COUNT						0x0400
#define SST_PCT_OF_FIELD_WIDTH						0x0800
#define SST_PCT_OF_FIELD_HEIGHT						0x0c00
#define SST_AVG_CHAR_WIDTHS						0x1000
#define SST_WIDE_CHAR_WIDTHS						0x1400
#define SST_LINES_OF_TEXT						0x1800

SpecSocketDrError

typedef enum /*word*/ {
        SSDE_DEVICE_BUSY = 0x0100,      						/* serial port or modem 
							   driver in use */
        SSDE_DIAL_ERROR = 0x0200,
        SSDE_LINE_BUSY = 0x0300,        /* modem got a busy signal */
        SSDE_NO_DIALTONE = 0x0400,
        SSDE_NO_ANSWER = 0x0500,
        SSDE_NO_CARRIER = 0x0600,
        SSDE_BLACKLISTED = 0x0700,      /* used in GSM network */
        SSDE_DELAYED = 0x0800,          /* used in GSM network */
        SSDE_CALL_FAILED = 0x0900, 						/* couldn't dial for some reason */
        SSDE_NEG_FAILED = 0x0a00,
        SSDE_AUTH_REFUSED = 0x0b00,
        SSDE_AUTH_FAILED = 0x0c00,
        SSDE_LQM_FAILURE = 0x0d00,
        SSDE_LOOPED_BACK = 0x0e00,
        SSDE_IDLE_TIMEOUT = 0x0f00,
        SSDE_DEVICE_NOT_FOUND = 0x1000,
        SSDE_DEVICE_TIMEOUT = 0x1100,
        SSDE_DEVICE_ERROR = 0x1200,
        SSDE_NO_USERNAME = 0x1300, 						/* no username and password
							   prompting used */
        SSDE_CANCEL = 0x1400,           /* user cancelled */
        SSDE_INVALID_ACCPNT = 0x1500    /* invalid access point */
} SpecSocketDrError;

Certain Socket library operations may return an error value as a SocketError value. If the root cause of the error was a low-level communications failure, then the high byte of the returned error word may contain a SpecSocketDrError value, with the SocketError value in the low byte.


Up: GEOS SDK TechDocs| Up | Prev: SocketLoadType ... | Next: SpecWidth ...