Audio.h revision 7c478bd95313f5f23a4c958a745db2134aa03244
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License, Version 1.0 only
* (the "License"). You may not use this file except in compliance
* with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright 1992-2002 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#ifndef _MULTIMEDIA_AUDIO_H
#define _MULTIMEDIA_AUDIO_H
#pragma ident "%Z%%M% %I% %E% SMI"
#include <AudioTypes.h>
#include <AudioError.h>
#include <AudioHdr.h>
#ifdef __cplusplus
extern "C" {
#endif
// Error-handling function declaration
char *);
// Data transfer subcodes.
// Returned from ReadData(), WriteData(), AsyncCopy(), Copy() in err.sys
enum AudioCopyFlag {
};
// This is the abstract base class from which all audio data types derive.
// It is invalid to create an object of type Audio.
static int idctr; // id seed value
int id; // object id number
int refcnt; // reference count
char *name; // name
// Set position
// XXX - should these be protected?
int getid() const; // Get id value
// Raise error code
// Raise error msg
char *msg, // error code
void Reference(); // Increment ref count
void Dereference(); // Decrement ref count
// Set user error func
virtual void SetErrorFunction(
// Set read position
// Set write position
// Read from current pos
void* buf, // buffer to fill
// Write to current pos
void* buf, // buffer to copy
// XXX - no Append() method for now because of name clashes
// methods specialized by inherited classes
// Read from position
void* buf, // buffer to fill
// Write at position
void* buf, // buffer to copy
// Write and extend
void* buf, // buffer to copy
// copy to another audio obj.
// copy to another audio obj.
// copy to another audio obj.
// Define default classification routines
// The appropriate routine should be specialized by each leaf class.
};
#include <Audio_inline.h>
#ifdef __cplusplus
}
#endif
#endif /* !_MULTIMEDIA_AUDIO_H */