#include "rdesktop.h"
#include <unistd.h>
#include <fcntl.h>
#include <errno.h>
#include <sys/ioctl.h>
#include <sys/audioio.h>
Go to the source code of this file.
◆ MAX_QUEUE
◆ wave_out_close()
Definition at line 76 of file rdpsnd_sun.c.
86 #if defined I_FLUSH && defined FLUSHW 90 #if defined AUDIO_FLUSH static unsigned int queue_lo
static unsigned int queue_hi
void rdpsnd_send_completion(RDPCLIENT *This, uint16 tick, uint8 packet_index)
static struct audio_packet packet_queue[MAX_QUEUE]
◆ wave_out_format_supported()
◆ wave_out_open()
Definition at line 51 of file rdpsnd_sun.c.
53 char *dsp_dev =
getenv(
"AUDIODEV");
57 dsp_dev =
xstrdup(
"/dev/audio");
static unsigned int queue_lo
_CRTIMP void __cdecl perror(_In_opt_z_ const char *_ErrMsg)
static unsigned int queue_hi
_Check_return_ char *__cdecl getenv(_In_z_ const char *_VarName)
char * xstrdup(const char *s)
◆ wave_out_play()
Definition at line 222 of file rdpsnd_sun.c.
232 static uint32 samplecnt = 0;
242 sentcompletion =
True;
258 for (
i = 0;
i <
out->end -
out->p;
i += 2)
269 sentcompletion =
False;
297 if (
info.play.samples >= samplecnt + ((numsamples * 7) / 10))
299 samplecnt += numsamples;
304 sentcompletion =
True;
static unsigned int queue_lo
_CRTIMP void __cdecl perror(_In_opt_z_ const char *_ErrMsg)
static struct _test_info info[]
static unsigned int queue_hi
static short g_samplewidth
void rdpsnd_send_completion(RDPCLIENT *This, uint16 tick, uint8 packet_index)
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
static struct audio_packet packet_queue[MAX_QUEUE]
Referenced by wave_out_write().
◆ wave_out_set_format()
Definition at line 110 of file rdpsnd_sun.c.
116 AUDIO_INITINFO(&
info);
121 info.play.encoding = AUDIO_ENCODING_LINEAR8;
125 info.play.encoding = AUDIO_ENCODING_LINEAR;
138 info.play.channels = 1;
142 info.play.channels = 2;
148 info.play.samples = 0;
_CRTIMP void __cdecl perror(_In_opt_z_ const char *_ErrMsg)
static struct _test_info info[]
static short g_samplewidth
◆ wave_out_volume()
Definition at line 164 of file rdpsnd_sun.c.
170 AUDIO_INITINFO(&
info);
174 if (
volume / AUDIO_MID_BALANCE != 0)
177 AUDIO_MID_BALANCE - (
left / (
volume / AUDIO_MID_BALANCE)) +
182 balance = AUDIO_MID_BALANCE;
185 info.play.gain =
volume / (65536 / AUDIO_MAX_GAIN);
186 info.play.balance = balance;
_CRTIMP void __cdecl perror(_In_opt_z_ const char *_ErrMsg)
static struct _test_info info[]
◆ wave_out_write()
Definition at line 196 of file rdpsnd_sun.c.
203 error(
"No space to queue audio packet\n");
static unsigned int queue_lo
static unsigned int queue_hi
static struct audio_packet packet_queue[MAX_QUEUE]
◆ dsp_
◆ dsp_bu
◆ g_reopened
◆ g_samplewidth
◆ g_swapaudio
◆ packet_queue
◆ queue_hi
◆ queue_lo