Thread View: de.comp.sys.next
2 messages
2 total messages
Started by joemann
Mon, 02 Nov 1992 17:26
Einlesen von Audio-Daten von CDROM
Author: joemann
Date: Mon, 02 Nov 1992 17:26
Date: Mon, 02 Nov 1992 17:26
51 lines
2593 bytes
2593 bytes
After installing 3.0 on all our machines the CD-ROM drive wasn't used too much
anymore. And to prevent it from being misused by installing NT on PCs (argh!) I
thought it could be a good idea to play back audio CDs. But unfortunately we
don't have an amplifier and speakers here, so I tried to read the data directly
off the CD and play it using the DSP. I wrote the following program which
constantly failed working when I inserted audio CDs. However, it works fine
with data CDs although the "music" isn't too enjoyable...
struct timeval tv;
struct esense_reply esense;
int fd,err,length=10,firstBlock=1024;
SNDSoundStruct *snd;
char *buf;
fd=open("/dev/rsd1h",O_RDONLY,0);
SNDAlloc(&snd,length*2048,SND_FORMAT_LINEAR_16,SND_RATE_HIGH,2,0);
buf=(char *)snd+snd->dataLocation;
bzero(buf,length*2048);
err=do_read2(fd,firstBlock,length,buf,&tv,&esense);
SNDStartPlaying(snd,1,2,NO,SND_NULL_FUN,SND_NULL_FUN);
do_read2 is a modification of the do_read function in
/NextDeveloper/Examples/UNIX/SCSI_CD/scsi_commands.c. I replaced the following
lines to really read the data into a buffer:
sr.sr_addr = buf;
sr.sr_dma_max = 256;
sr.sr_ioto = 5;
sr.sr_dma_dir = SR_DMA_RD;
The following messages showed up in the Console window:
sd1 (6,0): ERROR op:0x8 sd_state:4 scsi status:0x0
sd1 (6,0): sense key:0x5 additional sense code:0x64
SCSI Block in error = 1024 (no valid label)
Is this due to the fact that (a) the disk doesn't have a label (I thought those
"live" partitions were introduced for such cases) or (b) "something" in the
CD-ROM drive ensures that no digital copies of audio CDs can be made?
Erik Doernenburg
___________________________________________________________________
AMG Industrie Consulting GmbH (NeXT mail) erik@amg.de
Universitaet Dortmund knight06@pandora.informatik.uni-dortmund.de
--
Johannes 5 Joemann
Wissenschaftsladen Dortmund, Lindemannstr.84, D(W)-4600 Dortmund 1
Tel. 0231-104002 (ggf. Anrufbeantworter)
WILADO@DOO.ZER, joemann@anarch.do.open.de
Re: Einlesen von Audio-Daten von CDROM
Author: Henning Schmiedehausen
Date: Sun, 08 Nov 1992 17:03
Date: Sun, 08 Nov 1992 17:03
16 lines
1192 bytes
1192 bytes
In article <1992Nov2.172659.14581@anarch.do.open.de>, Johannes 5 Joemann writes: > Is this due to the fact that (a) the disk doesn't have a label (I thought those > "live" partitions were introduced for such cases) or (b) "something" in the > CD-ROM drive ensures that no digital copies of audio CDs can be made? (b) is correct. Sorry, bad luck. Party on Henning -- -- Henning Schmiedehausen --- barnard@forge.franken.de ---- A 3000/25 --- __ ...and in deep shelters lurk below, sub-regional control | Home __ /// who sympathize but cannot help to mend your body or your soul |of the\\\/// self-appointed guardians of the race... - Jethro Tull, A | BSF \XX/
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads