~ubuntu-branches/ubuntu/jaunty/nas/jaunty

« back to all changes in this revision

Viewing changes to lib/audio/WriteEl.c

  • Committer: Bazaar Package Importer
  • Author(s): Steve McIntyre
  • Date: 2004-06-23 01:15:02 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20040623011502-30uqd1dyu47iv2dp
Tags: 1.6d-1
New upstream release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
25
25
#include "Alibint.h"
26
26
 
27
27
void
28
 
_AuWriteElement(aud, flow, element_num, num_bytes, data, state, ret_status)
29
 
AuServer       *aud;
30
 
AuFlowID        flow;
31
 
int             element_num,
32
 
                state;
33
 
AuUint32   num_bytes;
34
 
AuPointer       data;
35
 
AuStatus       *ret_status;
 
28
_AuWriteElement(
 
29
                AuServer       *aud,
 
30
                AuFlowID        flow,
 
31
                int             element_num,
 
32
                int             state,
 
33
                AuUint32   num_bytes,
 
34
                AuPointer       data,
 
35
                AuStatus       *ret_status
 
36
                )
36
37
{
37
38
    register auWriteElementReq *req;
38
39
 
57
58
}
58
59
 
59
60
void
60
 
AuWriteElement(aud, flow, element_num, num_bytes, data, end_of_data, ret_status)
61
 
AuServer       *aud;
62
 
AuFlowID        flow;
63
 
int             element_num;
64
 
AuUint32   num_bytes;
65
 
AuPointer       data;
66
 
AuBool          end_of_data;
67
 
AuStatus       *ret_status;
 
61
AuWriteElement(
 
62
               AuServer       *aud,
 
63
               AuFlowID        flow,
 
64
               int             element_num,
 
65
               AuUint32   num_bytes,
 
66
               AuPointer       data,
 
67
               AuBool          end_of_data,
 
68
               AuStatus       *ret_status
 
69
               )
68
70
{
69
71
    AuUint32   maxBytes,
70
72
                    bytes,
87
89
    {
88
90
        bytes = num_bytes > maxBytes ? maxBytes : num_bytes;
89
91
        num_bytes -= bytes;
90
 
        _AuWriteElement(aud, flow, element_num, bytes, data,
91
 
                        num_bytes ? AuTransferStatePending : finalState,
 
92
        _AuWriteElement(aud, flow, element_num, 
 
93
                        num_bytes ? AuTransferStatePending : finalState,
 
94
                        bytes, data,
92
95
                        ret_status);
93
96
        data = (AuPointer) ((unsigned char *) data + bytes);
94
97
    } while (*pstatus == AuSuccess && num_bytes);