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_AUDIOEXTENT_H
28 #define _MULTIMEDIA_AUDIOEXTENT_H
30 #pragma ident "%Z%%M% %I% %E% SMI"
39 // This class defines an extent of a referenced audio class
40 class AudioExtent
: public Audio
{
42 Audio
* ref
; // reference to audio object
43 Double start
; // start time
44 Double end
; // end time
46 AudioExtent
operator=(AudioExtent
); // Assignment is illegal
51 Audio
* obj
, // audio object
52 double s
= 0., // start time
53 double e
= AUDIO_UNKNOWN_TIME
); // end time
54 virtual ~AudioExtent(); // Destructor
56 Audio
* GetRef() const; // Get audio obj
57 void SetRef(Audio
* r
); // Set audio obj
58 Double
GetStart() const; // Get start time
59 void SetStart(Double s
); // Set start time
60 Double
GetEnd() const; // Get end time
61 void SetEnd(Double e
); // Set end time
63 // class Audio methods specialized here
64 virtual Double
GetLength() const; // Get length, in secs
65 virtual char *GetName() const; // Get name string
66 virtual AudioHdr
GetHeader(); // Get header
67 virtual AudioHdr
GetHeader(Double pos
); // Get header at pos
70 virtual AudioError
ReadData(
71 void* buf
, // buffer to fill
72 size_t& len
, // buffer length (updated)
73 Double
& pos
); // start position (updated)
75 // Write is prohibited
76 virtual AudioError
WriteData(
77 void* buf
, // buffer to copy
78 size_t& len
, // buffer length (updated)
79 Double
& pos
); // start position (updated)
81 virtual Boolean
isExtent() const { return (TRUE
); }
88 #endif /* !_MULTIMEDIA_AUDIOEXTENT_H */