CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 5 of 5
  1. #1
    Join Date
    Jun 2000
    Location
    austin
    Posts
    101

    capacity of a cd

    exactly how many bytes of user data are available on an 700mb 80min cd?

    i'm writing a little cd burning program that allows you to add mp3/wav files to a list. when you add files to that list, the program will tell you how close to the cd's capacity you are (hence i need to know exactly how many bytes are available for a user to write to a cd).

    also, is there any way to tell an mp3's playing length from within a c program (its a linux program).

    and how many bytes per second is a wav file? i.e. if i know the wav's playing length, how big is the file?

    thanks.

  2. #2
    Join Date
    Apr 2003
    Location
    Los Angeles area
    Posts
    776

    Re: capacity of a cd

    I think you should google for "CD specification" and "mp3 specification" and "wav pcm specification" Any one will keep you reading for quite some time.

    Why people don't use search engines more often when starting new projects is baffling. There should be a forum called "google search terms" maybe that helps people pick the right search terms given what they want to do.

  3. #3
    Join Date
    Oct 2003
    Location
    Philadelphia, PA
    Posts
    167
    You also have to take into account that some of the factors of what size will write to a particular disk is dependent on the drive in which it will be used, as some drives are able to squeeze more than others. I think there's a hanlde in the window's API for this, I'm not sure on Linux. That would be the best way to do it. Otherwise, your solution might be a little bit Kludgy.
    Mike Dershowitz
    [email protected]
    www.lexientcorp.com

  4. #4
    Join Date
    Feb 2002
    Posts
    4,640
    Originally posted by mikedershowitz
    You also have to take into account that some of the factors of what size will write to a particular disk is dependent on the drive in which it will be used, as some drives are able to squeeze more than others.
    I hope not. If I wrote to a CD with a Panasonic burner, I'd sure hope I can read it on my Sony CD drive! If one drive is squeezing more information on the disk than another drive, then there's no guarentee that the second drive will read all the information off the disk.

    Perhaps you are reffering to blocks and clusters? Because this is something that you'll need to take into account, when you are calculating the space left on the CD. Offhand, I don't know what the standard CD cluster size is...

    Viggy

  5. #5
    Join Date
    Jul 2003
    Location
    Maryland
    Posts
    762
    Originally posted by mikedershowitz
    You also have to take into account that some of the factors of what size will write to a particular disk is dependent on the drive in which it will be used, as some drives are able to squeeze more than others.
    That isn't true at all. However, CD-Burners have the capability to overburn.

    His program needs to dynamically read in the size of the CD-R and then use that to do the calculations.

    The MP3 thing, not sure. If the lenght was in the ID3 tag (it isn't), it would be like 4 lines of STANDARD code to find it, but the lenght isn't in the ID3 tag, so you'll probably have to find an MP3 library, load the MP3 and check it.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured