1 |
/* |
/* |
2 |
rdesktop: A Remote Desktop Protocol client. |
rdesktop: A Remote Desktop Protocol client. |
3 |
Sound infrastructure |
Sound infrastructure |
4 |
Copyright (C) Michael Gernoth 2006 |
Copyright (C) Michael Gernoth 2006-2007 |
5 |
|
|
6 |
This program is free software; you can redistribute it and/or modify |
This program is free software; you can redistribute it and/or modify |
7 |
it under the terms of the GNU General Public License as published by |
it under the terms of the GNU General Public License as published by |
23 |
struct stream s; |
struct stream s; |
24 |
uint16 tick; |
uint16 tick; |
25 |
uint8 index; |
uint8 index; |
26 |
|
|
27 |
|
struct timeval arrive_tv; |
28 |
|
struct timeval completion_tv; |
29 |
}; |
}; |
30 |
|
|
31 |
struct audio_driver |
struct audio_driver |
32 |
{ |
{ |
33 |
void (*wave_out_write) (STREAM s, uint16 tick, uint8 index); |
void (*add_fds) (int *n, fd_set * rfds, fd_set * wfds, struct timeval * tv); |
34 |
BOOL(*wave_out_open) (void); |
void (*check_fds) (fd_set * rfds, fd_set * wfds); |
35 |
|
|
36 |
|
RD_BOOL (*wave_out_open) (void); |
37 |
void (*wave_out_close) (void); |
void (*wave_out_close) (void); |
38 |
BOOL(*wave_out_format_supported) (WAVEFORMATEX * pwfx); |
RD_BOOL (*wave_out_format_supported) (RD_WAVEFORMATEX * pwfx); |
39 |
BOOL(*wave_out_set_format) (WAVEFORMATEX * pwfx); |
RD_BOOL (*wave_out_set_format) (RD_WAVEFORMATEX * pwfx); |
40 |
void (*wave_out_volume) (uint16 left, uint16 right); |
void (*wave_out_volume) (uint16 left, uint16 right); |
41 |
void (*wave_out_play) (void); |
|
42 |
|
RD_BOOL (*wave_in_open) (void); |
43 |
|
void (*wave_in_close) (void); |
44 |
|
RD_BOOL (*wave_in_format_supported) (RD_WAVEFORMATEX * pwfx); |
45 |
|
RD_BOOL (*wave_in_set_format) (RD_WAVEFORMATEX * pwfx); |
46 |
|
void (*wave_in_volume) (uint16 left, uint16 right); |
47 |
|
|
48 |
char *name; |
char *name; |
49 |
char *description; |
char *description; |
50 |
|
int need_byteswap_on_be; |
51 |
|
int need_resampling; |
52 |
struct audio_driver *next; |
struct audio_driver *next; |
53 |
}; |
}; |
54 |
|
|
|
extern BOOL g_dsp_busy; |
|
|
extern int g_dsp_fd; |
|
|
|
|
|
void rdpsnd_queue_write(STREAM s, uint16 tick, uint8 index); |
|
|
struct audio_packet *rdpsnd_queue_current_packet(void); |
|
|
BOOL rdpsnd_queue_empty(void); |
|
|
void rdpsnd_queue_init(void); |
|
|
void rdpsnd_queue_next(void); |
|
|
int rdpsnd_queue_next_tick(void); |
|
|
|
|
55 |
/* Driver register functions */ |
/* Driver register functions */ |
56 |
struct audio_driver *alsa_register(char *options); |
struct audio_driver *alsa_register(char *options); |
57 |
struct audio_driver *libao_register(char *options); |
struct audio_driver *libao_register(char *options); |