emoose / OutRun2006Tweaks

Turning and spinning and spinning and turning, woah!
MIT License
304 stars 0 forks source link

[Feature Request] Support for looping with metadata tags (i.e. loopStart, loopEnd) #43

Open s-ilent opened 2 months ago

s-ilent commented 2 months ago

Would it be possible to implement looping audio similar to vgmstream, where tags for loopStart and loopEnd are stored in the track metadata?

vgmstream seems to have standardized ways for reading/adding loop points in OGG, WAV and FLAC files. (It also makes it pretty easy to convert from ADX into one of these other formats preserving the loop metadata.)

(While this is similar to #8 and #38, from what I can tell Outrun 2 SP on PS2 just has really really long audio files, which sucks for things like the Steam Deck with limited storage space if you want higher quality.)

emoose commented 1 month ago

Got something added to our flac reader for them, only tested it minimally but seems to be working fine.

I guess maybe the game should be able to turn off looping once you reach the final area though? Not really sure how to handle that yet, didn't actually see anything in Lindburgh that did anything like that...

Tenome commented 1 month ago

Got something added to our flac reader for them, only tested it minimally but seems to be working fine.

I guess maybe the game should be able to turn off looping once you reach the final area though? Not really sure how to handle that yet, didn't actually see anything in Lindburgh that did anything like that...

Would ogg LOOP support also be possible?

emoose commented 1 month ago

Would ogg LOOP support also be possible?

Probably not likely with the current code, this is still using the games OGG decoder which I haven't really tried mapping out, would probably be possible to find the libogg version they used and name things that way, but would be some effort though.

Probably be better to replace our libflac usage with something that could handle multiple formats instead really, and force game to always use that

The vgmstream linked in OP could be useful but seems meant for supporting many different formats over size/performance, wonder if there's something like that more focused on common audio formats (WAV/OGG/FLAC/MP3)