dmake: do not set MAKEFLAGS=k
[unleashed/tickless.git] / usr / src / cmd / audio / include / AudioPipe.h
blob1a2d0044833af28206d777a448373e559c6be5f0
1 /*
2 * CDDL HEADER START
4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License, Version 1.0 only
6 * (the "License"). You may not use this file except in compliance
7 * with the License.
9 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10 * or http://www.opensolaris.org/os/licensing.
11 * See the License for the specific language governing permissions
12 * and limitations under the License.
14 * When distributing Covered Code, include this CDDL HEADER in each
15 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16 * If applicable, add the following below this CDDL HEADER, with the
17 * fields enclosed by brackets "[]" replaced with your own identifying
18 * information: Portions Copyright [yyyy] [name of copyright owner]
20 * CDDL HEADER END
23 * Copyright (c) 1990-2001 by Sun Microsystems, Inc.
24 * All rights reserved.
27 #ifndef _MULTIMEDIA_AUDIOPIPE_H
28 #define _MULTIMEDIA_AUDIOPIPE_H
30 #pragma ident "%Z%%M% %I% %E% SMI"
32 #include <AudioUnixfile.h>
34 #ifdef __cplusplus
35 extern "C" {
36 #endif
38 // This is the 'base' class for pipes (such as stdin) containing audio data
39 class AudioPipe : public AudioUnixfile {
40 private:
41 AudioPipe(); // Constructor w/no args
42 AudioPipe operator=(AudioPipe); // Assignment is illegal
44 public:
45 // Constructor with path
46 AudioPipe(
47 const int desc, // file descriptor
48 const FileAccess acc, // access mode
49 const char *name = "(pipe)"); // name
51 // class AudioUnixfile methods specialized here
52 virtual AudioError Create(); // Create file
53 virtual AudioError Open(); // Open file
55 // Read from position
56 virtual AudioError ReadData(
57 void* buf, // buffer to fill
58 size_t& len, // buffer length (updated)
59 Double& pos); // start position (updated)
61 // Write at position
62 virtual AudioError WriteData(
63 void* buf, // buffer to copy
64 size_t& len, // buffer length (updated)
65 Double& pos); // start position (updated)
67 // class Audio methods specialized here
68 virtual Boolean isPipe() const { return (TRUE); }
71 #ifdef __cplusplus
73 #endif
75 #endif /* !_MULTIMEDIA_AUDIOPIPE_H */