Solved

How to grab audio-tracks

Posted on 1998-07-16
9
364 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

When writing generic code, using template meta-programming techniques, it is sometimes useful to know if a type is convertible to another type. A good example of when this might be is if you are writing diagnostic instrumentation for code to generat…
In days of old, returning something by value from a function in C++ was necessarily avoided because it would, invariably, involve one or even two copies of the object being created and potentially costly calls to a copy-constructor and destructor. A…
The goal of the video will be to teach the user the difference and consequence of passing data by value vs passing data by reference in C++. An example of passing data by value as well as an example of passing data by reference will be be given. Bot…
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.

739 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