Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ogg Vorbis support? #30

Open
Voros2 opened this issue Jul 25, 2017 · 9 comments
Open

Ogg Vorbis support? #30

Voros2 opened this issue Jul 25, 2017 · 9 comments

Comments

@Voros2
Copy link
Contributor

Voros2 commented Jul 25, 2017

Ogg Vorbis is a popular (and free) sound format used for both sounds and sometimes music in Doom WADs. I lack the knowledge to properly implement it, given how it's more complex than a Wave file.

Would it be possible for more experienced people familiar with the Ogg Vorbis codec to have a go with implementing it?

@chungy
Copy link
Contributor

chungy commented Jul 25, 2017

Understandably it's valuable in PK3 format (really, zip files) mods, but is there any standard for storing Vorbis in a WAD file?

It should be relatively simple to just copy Vorbis (or Opus, MP3, whatever) streams to/from WADs, assuming that's the request here. I would be uncomfortable with lossy encoding on either direction.

@chungy
Copy link
Contributor

chungy commented Jul 25, 2017

The ZDoom wiki doesn't seem particularly helpful whether their supported codecs are limited to PK3 or not. I suppose we can always test it. DeuTex already lets you insert arbitrary lumps via lumps/*.lmp (extra support via musics/sounds would be great, however!)

@Voros2
Copy link
Contributor Author

Voros2 commented Jul 25, 2017

So it won't have to convert Ogg files, rather recognise them properly compose/extract them without being renamed to MID, MUS, LMP or WAV. This is equally just as good. Making Deutex recognise the file format as a legit sound/music format would be a nice addition.

@chungy
Copy link
Contributor

chungy commented Jul 25, 2017

That would be my thought, I'd just like to research to see if there is existing source port support for it (rather not implement a feature nobody can use!). Wouldn't even require ogg libraries, just copy the file into the WAD :P

@NickZ
Copy link
Collaborator

NickZ commented Jul 26, 2017

I just tested it in GZdoom, OGG works perfectly with both music and sounds in a WAD.

@chungy
Copy link
Contributor

chungy commented Jul 26, 2017

That's good news, we probably should have Ogg (and MP3) insertion/extraction, no re-encoding in either direction.

It raises a question of how to handle insertion though. If there is both a d_runnin.wav and d_runnin.ogg in a directory, what should happen? One of the formats can have priority, or we could exit with an error informing of the ambiguity, or maybe something else...

@NickZ
Copy link
Collaborator

NickZ commented Jul 26, 2017

Apparently, If both D_RUNNIN.wav and D_RUNNIN.ogg are both in a wad, GZDoom uses the the last one as it's stored in the wad. If D_RUNNIN.wav is last, then it uses that, if D_RUNNIN.ogg is last, it uses that.

@chungy
Copy link
Contributor

chungy commented Jul 26, 2017

Can you provide an example of this wad? Neither of those names should be valid -- identifiers are only eight characters...

@Voros2
Copy link
Contributor Author

Voros2 commented Jul 26, 2017

By default Deutex should always look for WAV files and insert them. If -ogg is selected, it should either include only OGG files or include both WAV and OGG files. Preferably the former over the latter.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants