/[rdesktop]/jpeg/rdesktop/trunk/rdpsnd_sun.c
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /jpeg/rdesktop/trunk/rdpsnd_sun.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1364 by jsorg71, Thu Jan 4 04:55:56 2007 UTC revision 1372 by jsorg71, Mon Jan 8 04:47:06 2007 UTC
# Line 1  Line 1 
1  /* -*- c-basic-offset: 8 -*-  /* -*- c-basic-offset: 8 -*-
2     rdesktop: A Remote Desktop Protocol client.     rdesktop: A Remote Desktop Protocol client.
3     Sound Channel Process Functions - Sun     Sound Channel Process Functions - Sun
4     Copyright (C) Matthew Chapman 2003     Copyright (C) Matthew Chapman 2003-2007
5     Copyright (C) GuoJunBo guojunbo@ict.ac.cn 2003     Copyright (C) GuoJunBo guojunbo@ict.ac.cn 2003
6     Copyright (C) Michael Gernoth mike@zerfleddert.de 2003-2006     Copyright (C) Michael Gernoth mike@zerfleddert.de 2003-2007
7    
8     This program is free software; you can redistribute it and/or modify     This program is free software; you can redistribute it and/or modify
9     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
# Line 35  Line 35 
35  #define DEFAULTDEVICE   "/dev/audio"  #define DEFAULTDEVICE   "/dev/audio"
36    
37  static int dsp_fd = -1;  static int dsp_fd = -1;
38  static BOOL dsp_busy;  static RD_BOOL dsp_busy;
39    
40  static BOOL g_reopened;  static RD_BOOL g_reopened;
41  static short g_samplewidth;  static short g_samplewidth;
42  static char *dsp_dev;  static char *dsp_dev;
43    
# Line 64  sun_check_fds(fd_set * rfds, fd_set * wf Line 64  sun_check_fds(fd_set * rfds, fd_set * wf
64                  sun_play();                  sun_play();
65  }  }
66    
67  BOOL  RD_BOOL
68  sun_open(void)  sun_open(void)
69  {  {
70          if ((dsp_fd = open(dsp_dev, O_WRONLY | O_NONBLOCK)) == -1)          if ((dsp_fd = open(dsp_dev, O_WRONLY | O_NONBLOCK)) == -1)
# Line 99  sun_close(void) Line 99  sun_close(void)
99          dsp_fd = -1;          dsp_fd = -1;
100  }  }
101    
102  BOOL  RD_BOOL
103  sun_format_supported(RD_WAVEFORMATEX * pwfx)  sun_format_supported(RD_WAVEFORMATEX * pwfx)
104  {  {
105          if (pwfx->wFormatTag != WAVE_FORMAT_PCM)          if (pwfx->wFormatTag != WAVE_FORMAT_PCM)
# Line 112  sun_format_supported(RD_WAVEFORMATEX * p Line 112  sun_format_supported(RD_WAVEFORMATEX * p
112          return True;          return True;
113  }  }
114    
115  BOOL  RD_BOOL
116  sun_set_format(RD_WAVEFORMATEX * pwfx)  sun_set_format(RD_WAVEFORMATEX * pwfx)
117  {  {
118          audio_info_t info;          audio_info_t info;
# Line 199  sun_play(void) Line 199  sun_play(void)
199          ssize_t len;          ssize_t len;
200          unsigned int i;          unsigned int i;
201          STREAM out;          STREAM out;
202          static BOOL sentcompletion = True;          static RD_BOOL sentcompletion = True;
203          static uint32 samplecnt = 0;          static uint32 samplecnt = 0;
204          static uint32 numsamples;          static uint32 numsamples;
205    

Legend:
Removed from v.1364  
changed lines
  Added in v.1372

  ViewVC Help
Powered by ViewVC 1.1.26