2 * Copyright 2007 Haiku Inc. All rights reserved.
3 * Distributed under the terms of the MIT License.
5 #ifndef NULL_AUDIO_DRIVER_H
6 #define NULL_AUDIO_DRIVER_H
8 #include <drivers/driver_settings.h>
9 #include <drivers/Drivers.h>
10 #include <drivers/KernelExport.h>
12 #include <hmulti_audio.h>
16 #define FRAMES_PER_BUFFER 1024
17 #define MULTI_AUDIO_BASE_ID 1024
18 #define MULTI_AUDIO_DEV_PATH "audio/hmulti"
19 #define MULTI_AUDIO_MASTER_ID 0
27 void* buffers
[STRMAXBUF
];
34 sem_id buffer_ready_sem
;
43 device_stream_t playback_stream
;
44 device_stream_t record_stream
;
46 thread_id interrupt_thread
;
50 extern device_hooks driver_hooks
;
51 int32
format_to_sample_size(uint32 format
);
53 status_t
multi_audio_control(void* cookie
, uint32 op
, void* arg
, size_t len
);
55 status_t
null_hw_create_virtual_buffers(device_stream_t
* stream
, const char* name
);
56 status_t
null_start_hardware(device_t
* device
);
57 void null_stop_hardware(device_t
* device
);
59 #endif /* NULL_AUDIO_DRIVER_H */