Solved

How to grab audio-tracks

Posted on 1998-07-16
9
352 Views
Last Modified: 2010-04-01
How can I grab audio tracks with Visual C++? I have to access the CDROM, get the number of tracks and let the user select which tracks to copy to the harddisk. Are there any tools or SDK's which covers this topic?
0
Comment
Question by:joker1
  • 3
  • 3
  • 2
  • +1
9 Comments
 
LVL 23

Expert Comment

by:chensu
ID: 1168000
16-bit or 32-bit Visual C++?
0
 
LVL 2

Expert Comment

by:duneram
ID: 1168001
I did some looking around the net and found these things you can download:

ftp ftp.microsoft.com
user: anonymous
password (your email address)
cd \softlibs\mslfiles
bin
hash
get singacd.exe
get playcdno.exe
get playcd.exe
quit

Singacd has the source code to let you play a cd

Playcdno has more stuff on controlling CD's.

They come with source code and executables (pre built).  They are self extracting files.

You should also get ahold of Document Q81869 and Q81871 from the Microsoft Knowledge base.  YOu can fax for it via

Dial  (800) 936-4300.
Select the Win32 Software Development Kit.
Press #1
Select the delivery method, fax.
Enter your three-digit area code and seven-digit fax number on your phone keypad.

When prompted, enter the number of the Item ID and press#, for up to five items.


the key apis to use are:

mciSendCommand
and mciGetErrorString

mciSendCommand will return 0 when its successful.  If you call mciGetErrorString you can figure out whats going wrong.

Hopefully this will give you a good start on the whole process.  
0
 

Author Comment

by:joker1
ID: 1168002
Perhaps I didn't exactly explain what my problem is.

Getting the number of tracks is easy (I'm using an activex-control for getting this information), but I want to read the tracks on the cd and write them to my harddisk (wav-files). I'm using a cdrom which supports audio reading (Plextor 12/20Plex). I tried to read the audio tracks by sending scsi-commands to my cdrom, but I think the commands for reading audiotracks are non-standard. If so, I only need to support the Plextor drive.

I'm using 32-bit Visual C++, but it doesn't matter if your sollution is written in any other language.
0
Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

 
LVL 23

Expert Comment

by:chensu
ID: 1168003
http://www.tardis.ed.ac.uk/~psyche/cdda/CDDAsoftware_f.shtml

But I could not find any 32-bit source code to do so.
0
 

Author Comment

by:joker1
ID: 1168004
I found a working source code. It uses simple ASPI-commands, but before reading audio tracks with the read command you have to set a mode page of the cdrom to proper values.

If somebody is interested in it I can mail the source code.
0
 
LVL 23

Expert Comment

by:chensu
ID: 1168005
Does it work with IDE CD-ROM drives? Can you please tell us the URL for downloading it?
0
 
LVL 7

Accepted Solution

by:
linda101698 earned 150 total points
ID: 1168006
I am posting the solution found by joker1 so the question can be saved in the previously asked questions.

Linda Gardner
Customer Service @ Experts Exchange

Comment
     From: joker1
                                      Date: Thursday, July 23 1998 - 01:13AM PDT

     I found a working source code. It uses simple ASPI-commands, but before
     reading audio tracks with the read command you have to set a mode page
     of the cdrom to proper values.
0
 

Author Comment

by:joker1
ID: 1168007
I don't know whether it works with IDE drives (I don't have any). I also don't remember the URL where I found the code, but I can explain it:

First you have to have to set the sector size to 2368 (CDDA). This is done by calling the ModeSense command (0x1a) and setting the sector size to 2368.
Then you can read the blocks by calling the Read command (0x28). I didn't try to use the ReadLong command (0x3e).

I did this using a scsi-monitor program which I found in a book of SCSI. Now I try to implement this in my Visual C application, but I'm not very familar with ASPI-calls yet.
0
 
LVL 2

Expert Comment

by:duneram
ID: 1168008
Joker1:   cool!!  Good luck!!
0

Featured Post

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Unlike C#, C++ doesn't have native support for sealing classes (so they cannot be sub-classed). At the cost of a virtual base class pointer it is possible to implement a pseudo sealing mechanism The trick is to virtually inherit from a base class…
Many modern programming languages support the concept of a property -- a class member that combines characteristics of both a data member and a method.  These are sometimes called "smart fields" because you can add logic that is applied automaticall…
The viewer will learn how to pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.
The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question