/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (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 2008 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
#include <string.h>
#include <stdlib.h>
#include <libintl.h>
#include "bstream.h"
#include "trackio.h"
#include "misc_scsi.h"
#include "util.h"
#include "msgs.h"
#include "main.h"
#include "trackio.h"
#include "mmc.h"
static bstreamhandle
{
int at;
char *ext;
/* No audio type specified, look at extension */
if (audio_type == AUDIO_TYPE_NONE) {
if (ext) {
ext++;
}
"Cannot understand file extension for %s\n"),
fname);
exit(1);
}
} else {
at = audio_type;
}
if (at == AUDIO_TYPE_SUN)
return (open_au_read_stream(fname));
if (at == AUDIO_TYPE_WAV)
return (open_wav_read_stream(fname));
if (at == AUDIO_TYPE_CDA)
return (open_file_read_stream(fname));
if (at == AUDIO_TYPE_AUR)
return (open_aur_read_stream(fname));
return (NULL);
}
void
{
int i, nfiles;
/* number of tracks to write */
blks_req = 0;
for (i = 0; i < nfiles; i++) {
exit(1);
}
/* 2352 bytes per block, 75 blocks per second */
if (fsize % 2352)
blks_req++;
}
/* Put the device in track-at-once mode */
/* Build information for next invisible track, -1 */
"Cannot get writable address for the media.\n"));
exit(1);
}
"Defaulting to 650 MB (74 minute) disc.\n"));
} else {
/* LBA is always one less */
blks_avail++;
}
/*
* Actual number of blocks available based on nwa (next writable
* address) since there may already be information on the disc.
*/
if (blks_avail < blks_req) {
exit(1);
}
for (i = 0; i < nfiles; i++) {
"Simulation mode : skipping remaining tracks\n"));
break;
}
}
for (i = 0; i < nfiles; i++)
write_fini();
exit(0);
}