source: roaraudio/roard/include/driver_wmm.h @ 5961:06e7fd9e4c25

Last change on this file since 5961:06e7fd9e4c25 was 5961:06e7fd9e4c25, checked in by phi, 10 years ago

Updates of copyright and license headers

File size: 2.8 KB
Line 
1//driver_wmm.h:
2
3/*
4 *      Copyright (C) Philipp 'ph3-der-loewe' Schafft - 2009-2014
5 *
6 *  This file is part of roard a part of RoarAudio,
7 *  a cross-platform sound system for both, home and professional use.
8 *  See README for details.
9 *
10 *  This file is free software; you can redistribute it and/or modify
11 *  it under the terms of the GNU General Public License version 3
12 *  as published by the Free Software Foundation.
13 *
14 *  RoarAudio is distributed in the hope that it will be useful,
15 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
16 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17 *  GNU General Public License for more details.
18 *
19 *  You should have received a copy of the GNU General Public License
20 *  along with this software; see the file COPYING.  If not, write to
21 *  the Free Software Foundation, 51 Franklin Street, Fifth Floor,
22 *  Boston, MA 02110-1301, USA.
23 *
24 */
25
26#ifndef _DRIVER_WMM_H_
27#define _DRIVER_WMM_H_
28
29#include <roaraudio.h>
30
31#ifdef ROAR_HAVE_LIBWINMM
32
33struct driver_wmm {
34  UINT  id;             /* device id                       */
35  HWAVEOUT hwo;         /* waveout handler                 */
36  WAVEOUTCAPS caps;     /* device caps                     */
37  WAVEFORMATEX wavefmt; /* sample format                   */
38
39  int opened;           /* device has been opened          */
40  int prepared;         /* waveheaders have been prepared  */
41  int blocks;           /* number of blocks (wave headers) */
42  int splPerBlock;      /* sample per blocks.              */
43  int msPerBlock;       /* millisecond per block (approx.) */
44
45  void * bigbuffer;     /* Allocated buffer for waveheaders and sound data */
46  struct {
47   WAVEHDR wh;          /* waveheader                        */
48   char *  data;        /* sample data ptr                   */
49   int     idx;         /* index of this header              */
50   int     count;       /* current byte count                */
51   int     length;      /* size of data                      */
52   int     sent;        /* set when header is sent to device */
53  } * wh;          /* Pointer to waveheaders in bigbuffer             */
54  BYTE * spl;           /* Pointer to sound data in bigbuffer              */
55
56  int sent_blocks;      /* Number of waveheader sent (not ack).        */
57  int full_blocks;      /* Number of waveheader full (ready to send).  */
58  int widx;             /* Index to the block being currently filled.  */
59  int ridx;             /* Index to the block being sent.              */
60};
61
62int     driver_wmm_open_vio(struct roar_vio_calls * inst, char * device, struct roar_audio_info * info, int fh, struct roar_stream_server * sstream);
63int     driver_wmm_close_vio(struct roar_vio_calls * vio);
64ssize_t driver_wmm_write(struct roar_vio_calls * vio, void *buf, size_t count);
65
66#endif
67
68#endif
69
70//ll
Note: See TracBrowser for help on using the repository browser.