Author Topic: Oh No More Lemmings 26 song soundtrack  (Read 17777 times)

0 Members and 1 Guest are viewing this topic.

Offline namida

  • Administrator
  • Posts: 12399
    • View Profile
    • NeoLemmix Website
Re: Oh No More Lemmings 26 song soundtrack
« Reply #15 on: February 19, 2015, 02:58:27 AM »
Tsyu: Do you support the LOOPSTART and LOOPEND (or something like that) metadata?
My Lemmings projects
2D Lemmings: NeoLemmix (engine) | Lemmings Plus Series (level packs) | Doomsday Lemmings (level pack)
3D Lemmings: Loap (engine) | L3DEdit (level / graphics editor) | L3DUtils (replay / etc utility) | Lemmings Plus 3D (level pack)

Offline Tsyu

  • Moderator
  • Posts: 350
    • View Profile
Re: Oh No More Lemmings 26 song soundtrack
« Reply #16 on: February 19, 2015, 06:52:09 AM »
Unfortunately not. The reason is that Vorbis SPI, which SuperLemmini uses to play OGG files, does not support the mark feature that's necessary for rewinding a stream to a desired point. Therefore, I had to use two different files to support intros. (All sampled-audio formats are implemented this way, not just OGG.)

SuperLemmini does support two types of loop points in MIDI files: "loopStart" and "loopEnd" text markers to mark the looped section, or controller 111 to mark the beginning of the looped section. And the tracker formats (MOD, S3M, and IT) can do intros natively, which Lemmini (MOD only) and SuperLemmini support.

Offline namida

  • Administrator
  • Posts: 12399
    • View Profile
    • NeoLemmix Website
Re: Oh No More Lemmings 26 song soundtrack
« Reply #17 on: February 19, 2015, 07:18:03 AM »
Hm. Does it support *any* kind of seeking? If so, could you not just save the seek point in a variable and use an "on reaching Point B, jump to point A" type command?
My Lemmings projects
2D Lemmings: NeoLemmix (engine) | Lemmings Plus Series (level packs) | Doomsday Lemmings (level pack)
3D Lemmings: Loap (engine) | L3DEdit (level / graphics editor) | L3DUtils (replay / etc utility) | Lemmings Plus 3D (level pack)

Offline Tsyu

  • Moderator
  • Posts: 350
    • View Profile
Re: Oh No More Lemmings 26 song soundtrack
« Reply #18 on: February 19, 2015, 09:35:59 AM »
In Java input streams, bytes are read sequentially and are discarded once they are read. This makes it impossible to seek backward in a stream unless a "mark" was placed at the desired position, in which case it's only possible to seek backward to that position. Not all streams support the "mark" feature, however; such streams cannot seek backward at all.

All Java input streams can seek forward by a specified number of bytes of the raw stream. However, this isn't very useful in audio contexts, especially those involving non-PCM audio (such as pretty much every compressed format), because the number of bits in a sample can vary, and if the audio is encoded in blocks, those blocks will likely have headers.

There's no such thing as absolute seeking in Java streams, nor is there any concept of absolute positions. The only "seek" methods are "jump forward by n bytes" and "jump backward to the mark", the latter of which is supported only by some streams.

And yes, the problem is specific to Vorbis SPI (which, I should state right now, is a plugin that requires no special handling to use, allowing me to use the same code to open OGG, WAV, AIFF, and other sampled-audio files, at least for music). With the audio types that Java natively supports, I can open them in a way that provides mark support (and SuperLemmini is already doing this), but doing the same with Vorbis SPI does not produce mark-supporting streams for some reason. Thus, my only options are to either use two files or write my own code that uses JOrbis, which is surprisingly very difficult to use.

Offline jkapp76

  • Posts: 383
    • View Profile
Re: Oh No More Lemmings 26 song soundtrack
« Reply #19 on: February 24, 2015, 01:05:03 AM »
A couple more things...

1. I have completed my Midi versions of these songs, let me know if anyone is interested.

2. I have edited the Great CD audio tracks of Lemmings to loop perfectly with no gaps... (came out perfect)

The Midi has been a project of mine for a month or so, The CD audio was starting to bother me with the fade out and gaps.

...Jeremy
...Jeremy Kapp