Openapoc: Game refuses to start with ripped CD, should it?

Created on 15 Sep 2017  路  8Comments  路  Source: OpenApoc/OpenApoc

Some people still have small drives it seems, and for them it's better running the game with only graphics files (without music file which takes a lot of space proportionate to others). Some people, on the other hand, use a modified music file, with remastered music.

It seems before OpenApoc would run with a 0-length music file but now it complains if the file is of a different length.

Should we allow the game to run w/o music file, or with modified music file?

Code Query Enhancement Feature Request

Most helpful comment

I get why we'd require original exes with matching crc, but music shouldnt be that? I mean, we don't require original pck's, we allow modded, why disallow modded music? I think modded music should be ok.

All 8 comments

I'd go one step further and allow compressed music. The whole music file seems to compress neatly into a 30-meg Ogg file, which sounds fine to me (though there's probably a lot of inaudible-to-me artifacts). Supporting that would allow users with little storage space still play with music.

As for remastered music, weren't the track offsets and lengths hardcoded somewhere at some point? Would that mean the remasters would have to have same offsets and lengths?

I get why we'd require original exes with matching crc, but music shouldnt be that? I mean, we don't require original pck's, we allow modded, why disallow modded music? I think modded music should be ok.

Well, when I originally coded the music player, the MUSIC file was raw PCM data, so the player was basically streaming bytes from an indexed position to the soundcard, and the tracks indexes and lengths were hardcoded at the time. I don't know if this has been changed much since the original implementation (probably, because it was originally written for Allegro, rather than SDL)

There's no reason this couldn't be changed, it's just I was just developing vanilla and not bothered about "extensions" until things were working.

I believe the music on the original disc is raw pcm, no headers or anything so a hard-coded table of offsets is the only way we can do it. For remastered music, these tables likely need changing, so they'll probably need an xml overlay to replace them. A checksum would probably make sense to match up these tables, as unless each of the tracks is exactly the same length, order, and padding as in the original disc they would be wrong.

Adding other music sources would be "relatively" easy - it already treats those chunks as separate tracks, adding a backend that can load (for example) an .ogg or .mp3 would allow having individual files for each track, removing the need for that table.

I just used the 'music' file as a test of "Is the CD mounted?" - that may not be a good decision if it's not a hard requirement, or if people start stripping their .iso copies or replacing the music or whatever. We could just remove this check, which may be less 'user-friendly', or find a better test example.

If you agree adding support individual tracks of compressed .ogg/mp3 in "music" folder (if it's detected) in data folder it will be really great, it will be a big economy (up to 200-250mb) of disc space, and also there can be added my remastered soundtrack, that would be a simple, but great mod...

For example there is soundtrack by GoG (a bit remastered, but nothing resampled and very lossy compressed, officialy distributed in their repack) and also unofficial still unknown my resampled ver (ripped original PCM tracks, separated and normally resampled, where they really could be improved by resampling)...

Also could you tell, there is 34 or 35 tracks in MUSIC stream? Last one seems like have 2x track mixed to single. In gog soundtrack they replaced 01 with 35th instead that separated from 34th.

can you remove the check JonnyH or tell me how?

Audio format specification for Apocalypse is here
https://www.ufopaedia.org/index.php/Audio_Formats_(Apocalypse)
You can open the music file in goldwave (or similar) using the following settings

Property | Value
Channels | 2 (Stereo)
Format | Signed 16bit PCM
Endian | Little Endian
Sample Rate | 22,050Hz

This will provide the best quality samples we can obtain for then splitting into individual tracks

_Because of the minefield allowing ripped (i.e. unofficial CDs) would place us in, i really do not think allowing them should be supported. cd.iso should follow one of the standard, retail, disc structures and nothing else. That way we stay a project that requires legal ownership of the original._

OpenApoc now supports Music Mods and will soon have it's own OST made by FLVZ and Team thanks to the efforts of JonnyH and SupSuper with getting the code together for playing OGG music format

Ripped and Pirate CDs have been discussed many a time over at Discord and we risk having legal trouble with Take2 if we allow pirate CDs to be supported... So with alternative music options available to OpenApoc in the pipeline, modding support already implemented and the fact that we shouldn't be supporting piracy, it's time to close this issue.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

muton-commander picture muton-commander  路  3Comments

Quickmind01 picture Quickmind01  路  3Comments

Quickmind01 picture Quickmind01  路  3Comments

FilmBoy84 picture FilmBoy84  路  3Comments

FilmBoy84 picture FilmBoy84  路  3Comments