OGG loop metadata

Post a reply

Smilies
:D :) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :wink: :geek: :ugeek: :!: :?: :idea: :arrow: :| :mrgreen: :3: :wub: >:( :blergh:
View more smilies

BBCode is OFF
Smilies are ON

Topic review
   

Expand view Topic review: OGG loop metadata

Re: OGG loop metadata

by Gez » Sat Jul 24, 2010 1:54 pm

[wiki=Special:WhatLinksHere/Audio_loop]Ahead of you.[/wiki]

Re: OGG loop metadata

by Ceeb » Sat Jul 24, 2010 1:46 pm

This should be documented on the list of supported music formats, I think.

Re: OGG loop metadata

by Zippy » Mon Jul 19, 2010 9:16 pm

randy wrote:
Zippy wrote:Are we talking all sounds, wavs et al.? In that case I do see the problem in undercutting the old assumption of building the loop into the file always looping.
What? People did that and expected it to work? I can only remember people wondering why their sound effects were looping. It never worked 100% properly. If people actually use it, then I'll need to do some more rewriting to make it a properly supported feature. I figured I could just take the easy way out and rely on the modder to specify it explicitly.
I never did it. I was always annoyed with having to do it when editing for Half-Life as it seemed to me if the sound effect needed to loop I should just be able to tell the engine that when it plays it should loop. I was assuming though that if people were accidentally running into ZDoom looping their cue pointed files, then it must have been fully supported (by FMOD or whatever). It is telling that there isn't much mention of it outside of those accidental instances though. So... I guess the answer is... no... ?

Re: OGG loop metadata

by randi » Mon Jul 19, 2010 8:00 pm

Gez wrote:Does that mean that if they are not played through an [wiki]A_PlaySound[/wiki] call (but, for example, they're the level music as assigned in MAPINFO), then they won't loop?
I wrote "sounds", not "music", so it only applies to sound effects. Level music is still always looped.
Zippy wrote:Are we talking all sounds, wavs et al.? In that case I do see the problem in undercutting the old assumption of building the loop into the file always looping.
What? People did that and expected it to work? I can only remember people wondering why their sound effects were looping. It never worked 100% properly. If people actually use it, then I'll need to do some more rewriting to make it a properly supported feature. I figured I could just take the easy way out and rely on the modder to specify it explicitly.

To further expound on this, the LOOP_START and LOOP_END tags will work with any sound format (other than MP3) that supports custom tags. (I believe this is only Vorbis and FLAC, but I could be wrong.) For sound effects, you can also use the LOOP_BIDI tag to create bidirectional "ping-pong" loops.

Re: OGG loop metadata

by NeuralStunner » Mon Jul 19, 2010 1:49 pm

Zippy wrote:I think the actual case is that "OGG files with LOOP tags won't loop when played as sounds (not music) unless started with CHAN_LOOP," by virtue of the fact that it seems to make the most sense.
That was the impression I got, as well.

Re: OGG loop metadata

by Zippy » Mon Jul 19, 2010 1:31 pm

Wait, wait... if the change only applies to OGG's which include a special tag for looping, won't it then always loop as level music (if the tags are properly defined)? It sounds like the scenario you're defining is one where the user somehow invoked the new behavior without setting a loop point in the OGG tags which... shouldn't be possible.

Unless... are we talking all sounds, wavs et al.? In that case I do see the problem in undercutting the old assumption of building the loop into the file always looping. I think the actual case is that "OGG files with LOOP tags won't loop when played as sounds (not music) unless started with CHAN_LOOP," by virtue of the fact that it seems to make the most sense.

Re: OGG loop metadata

by Gez » Mon Jul 19, 2010 10:45 am

I am intrigued by this:
Sounds that define a loop no longer play looped by default. They must be started with CHAN_LOOP so that the higher level sound code knows they loop and can handle them accordingly.
Does that mean that if they are not played through an [wiki]A_PlaySound[/wiki] call (but, for example, they're the level music as assigned in MAPINFO), then they won't loop?

Re: OGG loop metadata

by randi » Fri Jul 09, 2010 9:02 pm

Added. The tags are "LOOP_START" and "LOOP_END". Your example file should be tagged as follows:

LOOP_START = :29.549
LOOP_END = 1:34.638

They can also contain PCM values rather than times by just giving them as single integers without any punctuation.

See my commit message for more details.

Re: OGG loop metadata

by edward850 » Thu Jul 01, 2010 12:16 am

When I was told that FMOD didn't have that much control over the actual playback (ie, it can do loop points, but only if the format its playing back supports it). Guess I should double check information like that.

Re: OGG loop metadata

by randi » Thu Jul 01, 2010 12:00 am

It does. Were you under the mistaken impression that FMOD can't do loop points?

Re: OGG loop metadata

by edward850 » Wed Jun 30, 2010 10:35 pm

randy wrote:FYI, I can set any loop points I want, including overriding whatever might be embedded in the file already.
Really? I always figured Fmod handled the playback of OGG in zdoom.

Re: OGG loop metadata

by Xaser » Wed Jun 30, 2010 10:18 pm

A bit off-topic, but I never was able to find a good reason for the format change in the discussions I've read. Why'd they change it entirely, anyway?

A more pressing question, I suppose, is how the devil to actually export .DROs, since the recording controls don't seem to work at all for me. :?

Re: OGG loop metadata

by randi » Wed Jun 30, 2010 10:07 pm

Cleveland Rock wrote:It's easy to edit metadata in OGG files using Ex Falso or even Winamp.
You forgot foobar2000. :)
edward850 wrote:but also making sure [FMOD] supports it (which in most cases, it doesn't)
Errr... Rrrrrriiiggghhhttttt...

FYI, I can set any loop points I want, including overriding whatever might be embedded in the file already.
NeuralStunner wrote:raw OPL (DRO) was recently added, I think.
It's been around for quite a while now. What was added recently was support for DROs produced by the current version of DOSBox, since it's completely incompatible with the old format.

Re: OGG loop metadata

by NeuralStunner » Wed Jun 30, 2010 6:51 pm

Actually several of ZDoom's supported music formats are handled by the engine, not FMod. Thanks to that, raw OPL (DRO) was recently added, I think.

Re: OGG loop metadata

by edward850 » Wed Jun 30, 2010 6:39 pm

edward850, in the previous thread wrote:The problem is not only finding a digital audio format that supports loop points, but also making sure Fmod supports it (which in most cases, it doesn't). One could get crafty and store the loop data in an external file, or in the extended data of an OGG, but it's utterly useless if Fmod doesn't use it.

Top