AudioDevicectl.cc revision d8d4fa8f33f737d82c7dcd7ddd11b4342ce4fbca
/*
* 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 (c) 1992-2001 by Sun Microsystems, Inc.
* All rights reserved.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
#include <errno.h>
#include <string.h>
#include <unistd.h>
#include <stropts.h>
#include <AudioDevicectl.h>
// class AudioDevicectl methods
// Constructor with optional path argument
const char *path): // filename
{
}
{
// Set the streams flag
return (RaiseError(AUDIO_UNIXERROR));
return (AUDIO_SUCCESS);
}
// Get input encoding
{
clearhdr();
return (AudioDevice::GetReadHeader());
}
// Open an audio control device with the given name and mode
const char *devname,
int)
{
char *ctlname;
int desc;
// If the name is changing, set the new one
// XXX - convert name to device name, using audio config file
// For now, append "ctl" to the device name
// Check and open the control device.
err = AUDIO_SUCCESS;
}
delete ctlname;
if (err)
return (err);
// Set the file descriptor (this marks the file open)
if (err != AUDIO_SUCCESS) {
setfd(-1);
return (err);
}
// Get the device type
return (AUDIO_SUCCESS);
}