views:

76

answers:

2

Hi, I'm trying to create a CD-burning feature for a Java-based music player for my school project. Since I'm new to real-life programming (I've only learned to write codes on AP Computer Science A level), I don't know how I can apply the concepts I learned from APCS A to this task.

A friend of mine who is studying computer science at graduate school told me to "look up the cd player control functions and add methods in those classes to read in data that you want to write to the CD, write it to a buffer, write everything in the buffer to the CD itself, clear the buffer and then write a new chunk of data into the buffer," but I can't quite grasp what this means, and tt's really hard to contact her right now because she's busy working on her dissertation. Can someone from this forum please guide me through & explain the general concepts? Thank you!

+1  A: 

You'll probably want to find a good CD burning library such as this one or any other one - just make sure it works on whatever operating system you will be making this for. You probably won't be able to do this directly from Java (at least I am not aware of any way to write to a CD natively in Java) but you can do it in, for example, C++, and then use JNI to call it. JNI will allow you to call C++ code from within Java.

Sasha
+1  A: 

A simpler solution would be to write a front end for the open source cdrtools.

mikerobi