Jump to content

Ogg support


AggrorJorn
 Share

Recommended Posts

Were we able to set the zip pw via Leadwerks function that does that, from Lua? I know it does that in c++ and Leadwerks is the thing that needs to know the zip pw as it's the one that unzips and reads the data in its functions.

 

Currently that's all done "magically" via the le package process.

 

In the C++ main file is where it loads zipped files. Looks like Package::Load(). I don't see any pw being out in there so guessing Josh hides all that. I'm guessing he might be using the same pw for all LE packaged files that is in his library. Not at my pc atm to see if that function has an overload to take a custom pw but wouldn't that require pro version then since you're doing it in the C++ app?

 

That's a good point, if someone figure out what the password is :o , can we change the password and the package process in the Pro version? tongue.png

 

But maybe this is a subject to another thread, we should focus on the ogg support smile.png

My Leadwerks games!

https://ragingmages.itch.io/

Link to comment
Share on other sites

You could make a copy of data.zip, rename it, and delete everything except the sound files.

 

The zip passwords are pretty much impossible to figure out. Each file within the zip even has a different password.

My job is to make tools you love, with the features you want, and performance you can't live without.

Link to comment
Share on other sites

I found it really hard to make your own zip. In fact I was unable to make my own.

 

If someone has a tutorial of how to do this, it would be great!

 

-------------

 

In other news, am working on implementing Ogg audio files. I've separated the Sound::Reload function that Josh sent into two different code paths for audio importing.

 

I wrote a test script to import two audio files and compare their data to make sure the decompression is working.

 

I've also just compiled libogg and libvorbis to be used into my program.

 

I should have a working version some time tomorrow hopefully.

Link to comment
Share on other sites

So here is what I have at the moment.

 

http://martyj.net/OggSound.zip

 

The sample program is in the OggSound folder.

 

The ogg decoding code basically comes from this link https://svn.xiph.org/trunk/vorbis/examples/decoder_example.c

 

With some slight modification to improve readability a tiny bit and to integrate it with Leadwerks Streams.

 

The sample program requires two static libs. libogg_static.lib and libvorbis_static.lib

 

The way it works is that ogg is the container format and vorbis is the actual compressed audio data format.

 

They can be found at this path relative to that folder. libvorbis-1.3.5\libvorbis-1.3.5\win32\VS2010 and libogg-1.3.2\libogg-1.3.2\win32\VS2010

 

Just open the project in VS2015, fix the include and linking paths. Build and Profit!

 

When I run my demo app for some reason OpenALSound isn't initialized with my example Sound class using ogg file, but it works great for wave.

 

I've compared the output in Sound->data, and it matches an expected decompressed audio file using 16 bit little endian PCM @ 44100hz.

 

So hopefully Josh can figure that out to get it to actually play.

 

If there's anything else I can do to help implement this, let me know.

  • Upvote 7
Link to comment
Share on other sites

Thanks man, that was really easy to add into the sound loader. I have it working right now. I'm sure many people will find that useful.

 

You should add your shirt size and shipping info by editing your profile.

  • Upvote 1

My job is to make tools you love, with the features you want, and performance you can't live without.

Link to comment
Share on other sites

So, it took like allmost three years before this gets added by a member, lol?? I remember asking for it, allmost three years ago. Great job, martyj!

 

ZBrush 4R7 64-bit - 3DCoat 4.5 BETA 12 - Fl Studio 12 64Bit - LE 3.2 Indie version - Truespace 7 - Blender 2.71 - iClone 5.51 Pro - iClone 3DXChange 5.51 pipeline - Kontakt 5 - Bryce 7 - UU3D Pro - Substance Designer/Painter - Shadermap 3 - PaintShop Photo Pro X7 - Hexagon - Audacity - Gimp 2.8 - Vue 2015 - Reaktor 5 - Guitar Rig 5 - Bitmap2Material 3

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...