| | // | \X/ Flowerpower *proudly* presents | -----+------------------------------------------------------------------------ | | a Stereo CD-DA player based on a 14 bit low level driver | | with a cool CLI, Workbench and DeliTracker interface | | for Toshiba 4101 CDRom drives and compatible (*) | | (*) other drive types may be supported in the future EMAIL: flowerp@eikon.e-technik.tu-muenchen.de INTRODUCTION ------------ This utility was created because I am currently heavily involved in sound programming. I intend to replace the old amiga sound drivers (audio.device, sound datatypes) with more powerful and flexible ones. The CD-DA player was created in order to test the 14 bit driver which is also contained in this archive. This driver is my first step towards a complex multi-channel sound system (working name: "CyberSound"). As this utility proved to be quite funny and useful, I decided to create a user interface for it and to release it. Besides, I can show off with my 14 bit sound driver and introduce to you the concepts of my planned sound system. I really hope this project will succeed. At the moment of writing this document, I am listening to some fine CD-DA soundtrack in full multitasking via the Amiga audio channels. You hardly can spot any difference to "real" CD quality sound. FEATURES -------- This program will replay CD-DA data through the Amiga soundchannels at 22 kHz Stereo on ECS computers and at 44kHz on AGA computers in some screenmodes. You can also play mixed-mode CDs containing files as well (e.g. game CDs). Data tracks will be skipped. THE CLI INTERFACE ----------------- The command Template is as follows. TRACKS/N/M,DEVICE/K,UNIT/N/K,SOUNDDRIVER/K,REPEAT/S,... FREQUENCY/N,QUALITY/N,BUFFERS/N,HIGHPRI/S TRACKS/N/M A list of the audio tracks to be played in the specified order. If omitted, all tracks will be played. DEVICE/K Specify the SCSI driver here. Defaults to "scsi.device" UNIT/N/K The unit number of the SCSI CDRom. Defaults to 3. SOUNDDRIVER/K Defaults to "14bit.driver". This is the only sound driver that exists at the moment). It is far from being perfect or finished. REPEAT/S A switch that enables the repeat mode. The track list will be played repeatedly if this parameter is specified. FREQUENCY/N You may try to replay the CD at different frequencies. Default is 44100 Hz. Higher frequencies will probably not work well (CDRom too slow), but slower replay may sound very funny. QUALITY/N Here you may specify the quality factor. This defaults to 1. That means every sample-word will be played. For example, a value of 3 means that only every third sample will be played, thus dividing the output frequency by 3. Note: The program will automatically increase this value when your hardware is not able to replay the desired frequency. On ECS machines, this value will be 2 all the time, on AGA machines this value adapts to the screenmodes while playing. BUFFERS/N This value specifies the size of the buffers that will be allocated in RAM to hold the CD-DA data from the drive. Three buffers will be allocated. A value of 75 means 1 second of sound. Default is 20. Memory usage can be calculated with the following formula: Memory Usage = BUFFERS * 7056 Byte. HIGHPRI/S This flag will increase the task priority of your SCSI driver so that replay will no longer be disturbed by moving and resizing windows. Be careful: This may not work with all SCSI drivers, so be warned! Setting this flag will allow you to use very small buffer values (e.g. 3). The priority will be reset on exit. PUBSCREEN/K This option allows you to specify the public screen name for the CDPlayer window to open on. GUI/S This switch will make the player open its graphical user interface. This may be useful when starting the player from a shell. THE WORKBENCH-INTERFACE ----------------------- The WorkBench interface uses the tapedeck gadget provided by Commodore on the WorkBench 3.0 disks. So this will probably require Kickstart 3.0. I don't know if this gadget class also works with Kickstart 2.0. The tapedeck gadget is simple, but functional. Some may prefer the DeliTracker interface which is explained below. You may use the following tooltypes in the program icon: TRACKS = DEVICE = UNIT = SOUNDDRIVER= REPEAT = FREQUENCY = QUALITY = BUFFERS = HIGHPRI = PUBSCREEN = If you do not specify an argument for REPEAT or HIGHPRI, the program will assume the switch is active (TRUE). THE DELITRACKER INTERFACE ------------------------- This program can also be used together with DeliTracker. Simply copy it into the Players directory of your DeliTracker installation. To activate the player, you only need to create one ore more "fake" modules. Use a text editor and type the following line CD-DA [OPTIONS] Save this file to anywhere you like. The [OPTIONS] Parameter is (guess what) optional and may contain the arguments defined above in the CLI section. When you play this module with DeliTracker, you will be able to listen to the CD. You can use DeliTracker's gadgets to navigate through the CD. The +/- speed gadgets at the left will allow you to fine-tune the replay frequency by 100Hz. Using the << and >> gadgets you can skip 10 seconds on the current track. DEFAULT SETTINGS ---------------- To avoid specifying the same options over and over, you can store your most frequently used options in an environment variable called CD-DA_DEFAULTS. These options are the same as defined in the CLI section. They will be overridden by the settings in the command line, the tool types or in the fake module. Note: Defining a default track list will not work. HINTS, TIPS & TRICKS -------------------- This programm will noticeably slow down your system. How much, depends on your SCSI controller (DMA will be of great advantage). 14 bit sound output is not quite as loud as normal Amiga sound output. You will probably have to turn up the volume of your amplifier. If you experience interruptions while playing, try to set the unit number of your CD ROM higher than that of your hard drives. Higher unit numbers will have precedence on the SCSI bus. But given heavy hard drive access, interruptions cannot be avoided completely. The Toshiba CDRom delivers the CD-DA data only at single speed, so timing is *very* critical. I have spent a good deal of work on perfecting the I/O routines. If you experience sound interruptions when moving or resizing windows, try setting the HIGHPRI flag. This will set the task priority of your SCSI driver to 21 (higher than that of input.device). This only works if your SCSI driver runs as a task and replies its IORequests from the task. There is some extra code to support the scsi.device of the A590/A2091 Controller (it uses two tasks). Smaller buffer values will mean shorter reaction times to the gadgets in DeliTracker. But small buffers will also increase the chance of audio interruptions. Reasonable values approximately start at 3. Do not try to access the data section of the CD while playing CD-DA data. Unfortunately, there is no protocol for sharing the CDRom drive between different tasks. So CDRom drivers like AmiCDRom and this player may interfere. After inserting a CD into the drive, wait a while until DOS and Worbench have identified the CD and displayed the icon. Then you may start to play the audio tracks. 14 bit is not quite 16 bit. But try to spot the difference. Even with headphones, this is very difficult. 22kHz on ECS machines is not *quite* 44kHz... umm, well: Blame it on Paula. But even this still sounds very good! LEGAL STUFF AND DISCLAIMER -------------------------- This program is Public Domain. It must only be distributed with full source code and documentation. This program works on my computer. I can neither guarantee that this programm will work on your machine nor that it is bug free. I am not responsible for any damage this program might cause. PROGRAM HISTORY --------------- CDPlayer 1.1 * PUBSCREEN and GUI options added * Selection of the stream format at the sound driver (16 bit big endian) FUTURE IDEAS ------------ *become a datatype as well (all in ONE executable) *a "real" CD-DA version of this DeliPlayer (using the CDRom's audio channel) *support of more CDRom drives (send me specs and infos!) *improve the 14 bit driver *write drivers for other soundcards (Toccata, Maestro) *After finishing CyberSound, adapt this player program to use the features of the new sound system. So any task can play any sound while you listen to that CD (CPU power *really* needed) CONTACT ADDRESS --------------- EMAIL: flowerp@eikon.e-technik.tu-muenchen.de FidoNet: 2:2480/465 SnailMail: Christian Buchner Ganghoferstraße 2 82110 Germering Germany Tel.: +49-(0)89/844872