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