rdpsnd_libao.c revision 6e9aa255e3376b2da5824c09c4c62bc233463bfe
/* -*- c-basic-offset: 8 -*-
rdesktop: A Remote Desktop Protocol client.
Sound Channel Process Functions - libao-driver
Copyright (C) Matthew Chapman <matthewc.unsw.edu.au> 2003-2008
Copyright (C) GuoJunBo <guojunbo@ict.ac.cn> 2003
Copyright (C) Michael Gernoth <mike@zerfleddert.de> 2005-2008
Copyright (C) 2013 Henrik Andersson
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(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
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/*
* Oracle GPL Disclaimer: For the avoidance of doubt, except that if any license choice
* other than GPL or LGPL is available it will apply instead, Oracle elects to use only
* the General Public License version 2 (GPLv2) at this time for any software where
* a choice of GPL license versions is made available with the language indicating
* that GPLv2 or any later version may be used, or where a choice of which version
* of the GPL is applied is otherwise unspecified.
*/
#include "rdesktop.h"
#include "rdpsnd.h"
#include "rdpsnd_dsp.h"
#include <unistd.h>
#include <fcntl.h>
#include <errno.h>
#define WAVEOUTLEN 16
static int default_driver;
static char *libao_device = NULL;
void libao_play(void);
void
{
/* We need to be called rather often... */
}
void
{
return;
if (!rdpsnd_queue_empty())
libao_play();
}
libao_open(void)
{
if (libao_device)
{
}
else
{
}
{
return False;
}
return True;
}
void
libao_close(void)
{
/* Ack all remaining packets */
while (!rdpsnd_queue_empty())
{
}
ao_shutdown();
}
{
{
return False;
}
{
return False;
}
return True;
}
void
libao_play(void)
{
struct audio_packet *packet;
int len;
unsigned int duration;
int next_tick;
if (reopened)
{
}
/* We shouldn't be called if the queue is empty, but still */
if (rdpsnd_queue_empty())
return;
next_tick += 65536;
{
unsigned int delay_us;
{
}
}
}
struct audio_driver *
libao_register(char *options)
{
static struct audio_driver libao_driver;
if (options)
{
}
return &libao_driver;
}