Solved

How to grab audio-tracks

Posted on 1998-07-16
9
373 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

[Live Webinar] The Cloud Skills Gap

As Cloud technologies come of age, business leaders grapple with the impact it has on their team's skills and the gap associated with the use of a cloud platform.

Join experts from 451 Research and Concerto Cloud Services on July 27th where we will examine fact and fiction.

Question has a verified solution.

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

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…
  Included as part of the C++ Standard Template Library (STL) is a collection of generic containers. Each of these containers serves a different purpose and has different pros and cons. It is often difficult to decide which container to use and …
The goal of the tutorial is to teach the user how to use functions in C++. The video will cover how to define functions, how to call functions and how to create functions prototypes. Microsoft Visual C++ 2010 Express will be used as a text editor an…
The viewer will learn how to use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.

636 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