4 * $Id: wm_cdda.h,v 1.2 1999/02/14 09:50:46 dirk Exp $
6 * This file is part of WorkMan, the civilized CD player library
7 * (c) 1991-1997 by Steven Grimm (original author)
8 * (c) by Dirk Försterling (current 'author' = maintainer)
9 * The maintainer can be contacted by his e-mail address:
10 * milliByte@DeathsDoor.com
12 * This library is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU Library General Public
14 * License as published by the Free Software Foundation; either
15 * version 2 of the License, or (at your option) any later version.
17 * This library is distributed in the hope that it will be useful,
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20 * Library General Public License for more details.
22 * You should have received a copy of the GNU Library General Public
23 * License along with this library; if not, write to the Free
24 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
29 * Information about a particular block of CDDA data.
32 unsigned char status
; /* see below */
39 /* Average volume levels, for level meters */
40 unsigned char lev_chan0
;
41 unsigned char lev_chan1
;
43 /* Current volume setting (0-255) */
46 /* Current balance setting (0-255, 128 = balanced) */
47 unsigned char balance
;
51 * cdda_block status codes.
53 #define WMCDDA_ERROR 0 /* Couldn't read CDDA from disc */
54 #define WMCDDA_OK 1 /* Read this block successfully (raw data) */
55 #define WMCDDA_PLAYED 2 /* Just played the block in question */
56 #define WMCDDA_STOPPED 3 /* Block data invalid; we've just stopped */
57 #define WMCDDA_ACK 4 /* Acknowledgement of command from parent */
58 #define WMCDDA_DONE 5 /* Chunk of data is done playing */
59 #define WMCDDA_EJECTED 6 /* Disc ejected or offline */
62 * Enable or disable CDDA building depending on platform capabilities, and
63 * determine endianness based on architecture. (Gross!)
65 * For header-comfort, the macros LITTLE_ENDIAN and BIG_ENDIAN had to be
66 * renamed. At least Linux does have bytesex.h and endian.h for easy
67 * byte-order examination.
72 # include <sys/types.h>
73 # include <sys/cdio.h>
78 # define WM_LITTLE_ENDIAN 1
79 # define WM_BIG_ENDIAN 0
81 # define WM_BIG_ENDIAN 1
82 # define WM_LITTLE_ENDIAN 0
89 /* Linux only allows definition of endianness, because there's no
90 * standard interface for CDROM CDDA functions that aren't available
91 * if there is no support.
97 * XXX could this be a problem? The results are only 0 and 1 because
98 * of the ! operator. How about other linux compilers than gcc ?
100 # define WM_LITTLE_ENDIAN !(__BYTE_ORDER - __LITTLE_ENDIAN)
101 # define WM_BIG_ENDIAN !(__BYTE_ORDER - __BIG_ENDIAN)
105 * The following code shouldn't take effect now.
106 * In 1998, the WorkMan platforms don't support __PDP_ENDIAN
111 #if !WM_LITTLE_ENDIAN
113 # error yet unsupported architecture
114 foo bar
this is to stop the compiler
.
117 #endif /* WM_CDDA_H */