View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0000409 | Gameplay + OpenGL | [All Projects] Bug | public | 2017-03-09 11:31 | 2017-04-21 08:07 |
Reporter | Talon1024 | ||||
Assigned To | Graf Zahl | ||||
Priority | normal | Severity | minor | Reproducibility | always |
Status | resolved | Resolution | fixed | ||
Platform | Linux | OS | Ubuntu | OS Version | 16.04 |
Summary | 0000409: loop_start tags do not work with OpenAL backend | ||||
Description | If an OGG music track contains a loop_start tag, and you are using the OpenAL backend, the loop_start tag is ignored, and the song is repeated from the beginning. | ||||
Steps To Reproduce | 1. Use one of Xeotroid's music packs. 2. Listen to one of the songs until the end, and you may notice the song doesn't loop correctly. The incorrect looping may not be noticeable on some songs. | ||||
Tags | No tags attached. | ||||
Known issue. The entire tagging implementation heavily depends on FMod and isn't easily transferrable to OpenAL. This will require some research, but right now there's simply far more pressing issues than fixing this. |
|
Added for music. Sound effects should also read these tags but that will require interaction with the OpenAL backend. For music it could be done outside. |
|
The change for sound effects is put on hold for the time being. |
|
I can confirm on my end this happens too. Can this be considered before 3.0 is released? Happens on Windows too. |
|
Sorry, but I really have no idea what I need to do for sound effects to make them look. For streamed music it was easy because it happens on the ZDoom side. This needs to be handled within OpenAL so it will require a quite different approach. |
|
The main issue I see is that the sndfile and mpg123 decoders don't read the tags from the file. OpenAL can utilize loop points with the AL_SOFT_loop_points extension, and the LoadSoundRaw() method already utilizes it, so it's just a matter of getting the decoders to read those tags and provide them through the SoundDecoder interface. | |
ZDoom never supported MP3 tags. For Ogg and FLAC I added a brute force tag reader because I couldn't find any efficient code example that does it properly, only heavily bloated libraries. For music I added a client side streaming class analogous to the other music players where it was easy enough to check the tag data. That gets already converted to sample indices, so can I just pass these values to AL_LOOP_POINTS_SOFT? |
|
Graf Zahl wrote That gets already converted to sample indices, so can I just pass these values to AL_LOOP_POINTS_SOFT? For the sound effects, yes. Music/streaming can't use the buffer's AL_LOOP_POINTS_SOFT property since it uses a queue of multiple buffers that are regularly updated with the next chunk of audio. The client-side streaming class would still be needed to do what it currently is for music, while the LoadSound method can get those sample indices and pass them to AL_LOOP_POINTS_SOFT for sound effects. You could put the brute-force tag reader code into SndFileDecoder::open, store the converted sample indices in the class, then add a method for callers to retrieve them (perhaps through getInfo with the other properties?). That way would have a common interface to retrieve the loop points through the decoder regardless if it's music or sfx, and allow any future decoders to provide loop points as well. I can try to do it and make a pull request, though I'm not sure of a mod that uses loop points on ogg/flac sfx to test it. |
|
Ok, all done. I do not have any sounds using this feature so I'd appreciate if someone could test it and report back. |
|
They work, but now there's console errors. | |
Date Modified | Username | Field | Change |
---|---|---|---|
2017-03-09 11:31 | Talon1024 | New Issue | |
2017-03-09 11:41 | Graf Zahl | Status | new => confirmed |
2017-03-09 11:41 | Graf Zahl | Note Added: 0000921 | |
2017-04-01 14:41 | Graf Zahl | Note Added: 0001202 | |
2017-04-02 12:33 | Graf Zahl | Assigned To | => Graf Zahl |
2017-04-02 12:33 | Graf Zahl | Status | confirmed => on hold |
2017-04-02 12:33 | Graf Zahl | Note Added: 0001221 | |
2017-04-20 14:20 | Major Cooke | Note Added: 0001482 | |
2017-04-20 14:20 | Major Cooke | Note Edited: 0001482 | View Revisions |
2017-04-20 14:32 | Graf Zahl | Note Added: 0001484 | |
2017-04-20 17:29 | Chris | Note Added: 0001488 | |
2017-04-20 19:38 | Graf Zahl | Note Added: 0001490 | |
2017-04-20 22:06 | Chris | Note Added: 0001492 | |
2017-04-21 05:34 | Graf Zahl | Status | on hold => resolved |
2017-04-21 05:34 | Graf Zahl | Resolution | open => fixed |
2017-04-21 05:34 | Graf Zahl | Note Added: 0001503 | |
2017-04-21 08:07 | Major Cooke | Note Added: 0001504 |