LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 03-05-2012, 12:30 PM   #1
Philip87
LQ Newbie
 
Registered: Jul 2007
Posts: 20

Rep: Reputation: 0
Detect Audio CDs


Hi everyone,
I'm playing around with multimedia programming and I am wondering what's the most convenient way to detect if an inserted CD is an audio CD? How can I make my application notice that a CD has been inserted?
Thanks, best regards,
Philip
 
Old 03-06-2012, 12:00 AM   #2
Andy Alt
Member
 
Registered: Jun 2004
Location: Minnesota, USA
Distribution: Slackware64-stable, Debian64 stable, LFS 7.1
Posts: 497

Rep: Reputation: 163Reputation: 163
Philip, what programming language are you using?

You might have better luck receiving an answer if you request this thread be moved to the programming forum.
 
Old 03-06-2012, 03:42 AM   #3
Philip87
LQ Newbie
 
Registered: Jul 2007
Posts: 20

Original Poster
Rep: Reputation: 0
Right, I haven't been quite clear. I am programming c++, but I was thinking to make use of some pre-existant command line tools for this purpose. That's why I have posted in this forum.
 
Old 03-06-2012, 07:34 PM   #4
Andy Alt
Member
 
Registered: Jun 2004
Location: Minnesota, USA
Distribution: Slackware64-stable, Debian64 stable, LFS 7.1
Posts: 497

Rep: Reputation: 163Reputation: 163
I know this isn't what you were looking for, but could you use or adapt this method to suit your needs?

Tutorial on reading Audio-CDs

or maybe this would give you some ideas:

Quote:
root@debian:~# mount /dev/sr0 /mnt/cdrom/ ; echo $?
mount: block device /dev/sr0 is write-protected, mounting read-only
mount: you must specify the filesystem type
32
Where $? means to echo error code (32). This was my attempt to mount an audio cd.

or this
Quote:
root@debian:~# file -s /dev/sr0 ; echo $?
/dev/sr0: ERROR: cannot read `/dev/sr0' (Input/output error)
1
The 1 is the error code.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
FC11 plays DVDs, but does no longer recognizes data CDs or audio CDs jonnyo Linux - Hardware 9 10-28-2010 12:26 PM
How can I listen to audio CDs without audio cable? calande Linux - Desktop 11 07-20-2007 12:41 PM
Audio CDs Jongi Mandriva 5 08-08-2005 12:09 PM
Burning MP3 CDs (not audio CDs) mlamarche Linux - Newbie 6 11-29-2004 05:09 AM
cd mount doesn't detect cds... NonSumPisces Linux - Hardware 8 06-07-2004 06:46 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 05:02 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration