Solved

How to grab audio-tracks

Posted on 1998-07-16
9
341 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
 
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
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 

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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Errors will happen. It is a fact of life for the programmer. How and when errors are detected have a great impact on quality and cost of a product. It is better to detect errors at compile time, when possible and practical. Errors that make their wa…
This article will show you some of the more useful Standard Template Library (STL) algorithms through the use of working examples.  You will learn about how these algorithms fit into the STL architecture, how they work with STL containers, and why t…
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 additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.

757 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

Need Help in Real-Time?

Connect with top rated Experts

24 Experts available now in Live!

Get 1:1 Help Now