1 /****************************************************************************** 2 3 File: MediaDefs.h 4 5 Copyright 1995-97, Be Incorporated 6 7 ******************************************************************************/ 8 #ifndef _MEDIA_DEFS_H 9 #define _MEDIA_DEFS_H 10 11 #include <SupportDefs.h> 12 #include <Errors.h> 13 14 /* Buffer header for audio server */ 15 16 typedef struct audio_buffer_header { 17 int32 buffer_number; 18 int32 subscriber_count; 19 bigtime_t time; 20 int32 reserved_1; 21 int32 reserved_2; 22 int32 reserved_3; 23 int32 reserved_4; 24 } audio_buffer_header; 25 26 27 #define B_MEDIA_LEVEL B_REAL_TIME_PRIORITY 28 29 #define B_NO_CHANGE (-1) 30 31 /* ================ 32 Subscriber IDs and special values 33 ================ */ 34 35 #define B_NO_SUBSCRIBER_ID ((subscriber_id)-1) 36 #define B_NO_SUBSCRIBER_NAME "not subscribed" 37 38 #define B_SHARED_SUBSCRIBER_ID ((subscriber_id)-2) 39 #define B_SHARED_SUBSCRIBER_NAME "shared subscriber" 40 41 /* ================ 42 Values for sound files and audio streams 43 ================ */ 44 45 /* values for byte_ordering */ 46 enum { B_BIG_ENDIAN, B_LITTLE_ENDIAN }; 47 48 /* values for sample_format */ 49 enum { 50 B_UNDEFINED_SAMPLES, 51 B_LINEAR_SAMPLES, 52 B_FLOAT_SAMPLES, 53 B_MULAW_SAMPLES 54 }; 55 56 /* Audio device codes for BAudioSubscriber's 57 * Get/SetVolume() and EnableDevice() calls 58 */ 59 enum { 60 B_CD_THROUGH=0, 61 B_LINE_IN_THROUGH, 62 B_ADC_IN, 63 B_LOOPBACK, 64 B_DAC_OUT, 65 B_MASTER_OUT, 66 B_SPEAKER_OUT, 67 B_SOUND_DEVICE_END 68 }; 69 70 /* ADC input codes */ 71 enum { 72 B_CD_IN, 73 B_LINE_IN, 74 B_MIC_IN 75 }; 76 77 78 enum { 79 B_DAC_STREAM = 2354, 80 B_ADC_STREAM 81 }; 82 83 #endif // #ifndef _MEDIA_DEFS_H 84