Embed SPC

Hello everybody.

For people who don’t know what is spc file, i am referring to audio files from snes.

I was listening to one of this song, and i suddendly wanted to add something like that to my program. So, i did some research, and this is what i found :

(but as i didn’t have an opened “git-handler” i took it from here : http://www.generalfiles.biz/download/gs60a6f1c2h32i0/snes_spc-0.9.0.zip.html)

This is a player for spc files, written in C. Ok, nothing wonderfull in that except that:

  1. the licence is gpl v2. I don’t exactly know what is means about the authorization to translate it into java but … well, if you know, you can let me know :slight_smile:
  2. i tried to compile (with dev-cpp duuuuh =) ) and it works. Ok, it can sounds stupid, but a lot of time i just download stuff and end with “some library” missing. I suck at compilation. But this one work as is.
  3. it’s small, at least it seems to me really small (the zipped source file is about 70 ko).
  4. in the readme, you have a procedure (this is what i tested to say that it works) to create a wav file from a spc file. I’ll come back to this point later.
  5. i heard stuff about a java porting made by the author himself, but i didn’t find it.

My main problem is … well, it’s C. So, there is a lot of precompiler defs and special structures and bytes access and pointer shift etc. Not something easy to translate into Java.
But, if we don’t find how to translate it, we can still use the fact 4) to pipe the output into ram and consume it in java (and use audionode etc.) So, we will (i will :p) not have to create a full translation into java, only modify a bit the “test” exemple.

As spc files are really (really ! I think more than mdi !) small, it could lighten a lot our games. Do you think that it’s a good idea ? And, do you know if it’s possible to create new spc files ? (this question will be important, as if the answer is no we will have to use only copyrighted sounds :confused: ).

Thanks for reading :slight_smile:

GPL is a “viral” license. Meaning your software has to be released under GPL too if you want to use the code. The LGPL would allow you to use external libraries under LGPL in a closed source software, GPL does not. So this could only be used in free open source software.

I am maybe wrong, but on the git you have this file:

and the title is

GNU LESSER GENERAL PUBLIC LICENSE Version 2.1, February 1999

Isn’t this “LGPL” ? (Lesser General Public License)

Plus : if i translate it into java, the licence remains the same ?
And if i use this as a backend, as a separated programme that communicate with the main program through a protocole (like command line) ? I mean : am i allowed to diffuse only the source of the backend ?

These lasts questions are interesting only if the “lesser general public licence” is not lgpl.

@bubuche said: I am maybe wrong, but on the git you have this file:

and the title is

Isn’t this “LGPL” ? (Lesser General Public License)

Plus : if i translate it into java, the licence remains the same ?
And if i use this as a backend, as a separated programme that communicate with the main program through a protocole (like command line) ? I mean : am i allowed to diffuse only the source of the backend ?

These lasts questions are interesting only if the “lesser general public licence” is not lgpl.

Yeah thats LGPL, so you’d only have to release the source of the library. Good news :slight_smile:

A port straight from some other source (as in you read the code there and write it in the other language) is also considered a modification of the original code. E.g., when engineers created the first non-IBM BIOS code, they all had to sign a paper saying they didn’t look at the original IBM code and didn’t reverse engineer it. Their actual code would have looked different in any case as their hardware probably worked differently. So you can’t circumvent the GPL by using a different language, its the same intellectual property.

Edit:
And for the “external” use: It doesn’t matter, according to GPL you cannot distribute a closed source software together with this code (or its binary form), period. You can make the user download and install it later, though. But also not in an automated form, e.g. with the installer or so, it has to be at least a button press with an information about what the user does by clicking that button. :slight_smile: