2006-09-17 12:32:18 +02:00
|
|
|
/*
|
|
|
|
rdesktop: A Remote Desktop Protocol client.
|
|
|
|
Sound infrastructure
|
2008-07-11 05:51:23 +02:00
|
|
|
Copyright (C) Michael Gernoth 2006-2008
|
2006-09-17 12:32:18 +02:00
|
|
|
|
2010-01-12 09:31:06 +01:00
|
|
|
This program is free software: you can redistribute it and/or modify
|
2006-09-17 12:32:18 +02:00
|
|
|
it under the terms of the GNU General Public License as published by
|
2010-01-12 09:31:06 +01:00
|
|
|
the Free Software Foundation, either version 3 of the License, or
|
2006-09-17 12:32:18 +02:00
|
|
|
(at your option) any later version.
|
|
|
|
|
|
|
|
This program is distributed in the hope that it will be useful,
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
GNU General Public License for more details.
|
|
|
|
|
|
|
|
You should have received a copy of the GNU General Public License
|
2010-01-12 09:31:06 +01:00
|
|
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
2006-09-17 12:32:18 +02:00
|
|
|
*/
|
|
|
|
|
|
|
|
struct audio_packet
|
|
|
|
{
|
|
|
|
struct stream s;
|
|
|
|
uint16 tick;
|
|
|
|
uint8 index;
|
2006-10-26 11:47:17 +02:00
|
|
|
|
|
|
|
struct timeval arrive_tv;
|
|
|
|
struct timeval completion_tv;
|
2006-09-17 12:32:18 +02:00
|
|
|
};
|
|
|
|
|
2006-09-17 13:04:50 +02:00
|
|
|
struct audio_driver
|
|
|
|
{
|
2006-12-07 16:23:45 +01:00
|
|
|
void (*add_fds) (int *n, fd_set * rfds, fd_set * wfds, struct timeval * tv);
|
|
|
|
void (*check_fds) (fd_set * rfds, fd_set * wfds);
|
|
|
|
|
2007-01-11 04:30:18 +01:00
|
|
|
RD_BOOL(*wave_out_open) (void);
|
2006-09-17 13:04:50 +02:00
|
|
|
void (*wave_out_close) (void);
|
2007-01-11 04:30:18 +01:00
|
|
|
RD_BOOL(*wave_out_format_supported) (RD_WAVEFORMATEX * pwfx);
|
|
|
|
RD_BOOL(*wave_out_set_format) (RD_WAVEFORMATEX * pwfx);
|
2006-09-17 13:04:50 +02:00
|
|
|
void (*wave_out_volume) (uint16 left, uint16 right);
|
2006-12-07 16:23:45 +01:00
|
|
|
|
2007-01-11 04:30:18 +01:00
|
|
|
RD_BOOL(*wave_in_open) (void);
|
2007-01-02 17:30:06 +01:00
|
|
|
void (*wave_in_close) (void);
|
2007-01-11 04:30:18 +01:00
|
|
|
RD_BOOL(*wave_in_format_supported) (RD_WAVEFORMATEX * pwfx);
|
|
|
|
RD_BOOL(*wave_in_set_format) (RD_WAVEFORMATEX * pwfx);
|
2007-01-02 17:30:06 +01:00
|
|
|
void (*wave_in_volume) (uint16 left, uint16 right);
|
|
|
|
|
2006-09-17 13:04:50 +02:00
|
|
|
char *name;
|
|
|
|
char *description;
|
2006-09-17 17:25:10 +02:00
|
|
|
int need_byteswap_on_be;
|
2006-10-01 16:03:43 +02:00
|
|
|
int need_resampling;
|
2006-09-17 13:04:50 +02:00
|
|
|
struct audio_driver *next;
|
|
|
|
};
|
|
|
|
|
|
|
|
/* Driver register functions */
|
|
|
|
struct audio_driver *alsa_register(char *options);
|
|
|
|
struct audio_driver *libao_register(char *options);
|
|
|
|
struct audio_driver *oss_register(char *options);
|
|
|
|
struct audio_driver *sgi_register(char *options);
|
|
|
|
struct audio_driver *sun_register(char *options);
|