Solved

How to grab audio-tracks

Posted on 1998-07-16
9
356 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
Active Directory Webinar

We all know we need to protect and secure our privileges, but where to start? Join Experts Exchange and ManageEngine on Tuesday, April 11, 2017 10:00 AM PDT to learn how to track and secure privileged users in Active Directory.

 
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

Active Directory Webinar

We all know we need to protect and secure our privileges, but where to start? Join Experts Exchange and ManageEngine on Tuesday, April 11, 2017 10:00 AM PDT to learn how to track and secure privileged users in Active Directory.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
IdTCPClient1->Disconnect(); not working 3 77
Need some help with Microsoft Visual Studio C++ 2003 5 67
C++ help/ Toy problem 19 31
learn programming 8 42
Templates For Beginners Or How To Encourage The Compiler To Work For You Introduction This tutorial is targeted at the reader who is, perhaps, familiar with the basics of C++ but would prefer a little slower introduction to the more ad…
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
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 be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.

830 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