vfs: check userland buffers before reading them.
[haiku.git] / src / kits / media / legacy / OldMediaDefs.h
blob069e1e587e4477d98cd111fcb1a37b25f2eacc87
1 /******************************************************************************
3 File: MediaDefs.h
5 Copyright 1995-97, Be Incorporated
7 ******************************************************************************/
8 #ifndef _MEDIA_DEFS_H
9 #define _MEDIA_DEFS_H
11 #include <SupportDefs.h>
12 #include <Errors.h>
14 /* Buffer header for audio server */
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;
27 #define B_MEDIA_LEVEL B_REAL_TIME_PRIORITY
29 #define B_NO_CHANGE (-1)
31 /* ================
32 Subscriber IDs and special values
33 ================ */
35 #define B_NO_SUBSCRIBER_ID ((subscriber_id)-1)
36 #define B_NO_SUBSCRIBER_NAME "not subscribed"
38 #define B_SHARED_SUBSCRIBER_ID ((subscriber_id)-2)
39 #define B_SHARED_SUBSCRIBER_NAME "shared subscriber"
41 /* ================
42 Values for sound files and audio streams
43 ================ */
45 /* values for byte_ordering */
46 enum { B_BIG_ENDIAN, B_LITTLE_ENDIAN };
48 /* values for sample_format */
49 enum {
50 B_UNDEFINED_SAMPLES,
51 B_LINEAR_SAMPLES,
52 B_FLOAT_SAMPLES,
53 B_MULAW_SAMPLES
56 /* Audio device codes for BAudioSubscriber's
57 * Get/SetVolume() and EnableDevice() calls
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
70 /* ADC input codes */
71 enum {
72 B_CD_IN,
73 B_LINE_IN,
74 B_MIC_IN
78 enum {
79 B_DAC_STREAM = 2354,
80 B_ADC_STREAM
83 #endif // #ifndef _MEDIA_DEFS_H