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
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]
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>
38 // This is the 'base' class for pipes (such as stdin) containing audio data
39 class AudioPipe
: public AudioUnixfile
{
41 AudioPipe(); // Constructor w/no args
42 AudioPipe
operator=(AudioPipe
); // Assignment is illegal
45 // Constructor with path
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
56 virtual AudioError
ReadData(
57 void* buf
, // buffer to fill
58 size_t& len
, // buffer length (updated)
59 Double
& pos
); // start position (updated)
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
); }
75 #endif /* !_MULTIMEDIA_AUDIOPIPE_H */