• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Release [C#] [LIBRARY] SABSFile library (open sound files)
#11
Woot! That's great! Keep up the awesome work

Also sorry for ignoring you in your post before that, Forgot to check the thread, will try it out!

Works perfectly! Thank you so much.
Only thing I noticed is that the first ~20 entries in spl_code_post_gfx.all.sabs all seem invalid (perhaps those files are in the sabl files?)

[Image: Bd3QT.png]
  Reply
#12
Just make sure to add safety checks and you'll be alright.
[Image: 30xhrep.png]

A casual conversation between barata and I about Nukem.
[-] The following 1 user says Thank You to master131 for this post:
  • JariZ
  Reply
#13
Yea, I know, I was just curious on what it might be
  Reply
#14
So yea, The offsets it's giving me seem to be invalid.
It's either to large or the offset is negative (wtf?)


Code:
Offset: E  Size: 14
Offset: 0  Size: 5674800
Offset: 20D5A612  Size: 3A6C613B
Offset: 732E6C6C  Size: 736261
Offset: 736F705F  Size: 66675F74
Offset: 746F6F72  Size: 6C6C612E
Offset: 0  Size: 43614C66
Offset: B80B0000  Size: 800F002
------- EXTRACTION -------
Failed to extract entry 0xE (Offset and length are outside the bounds of the array or the number is greater than the number of elements from index to the end of the source collection.)
Failed to extract entry 0x0 (offset and length are outside the bounds of the array or the number is greater than the number of elements from index to the end of the source collection.)
Failed to extract entry 0x20D5A612 (Offset and length are outside the bounds of the array or the number is greater than the number of elements from index to the end of the source collection.)
Failed to extract entry 0x732E6C6C (Offset and length are outside the bounds of the array or the number is greater than the number of elements from index to the end of the source collection.)
Failed to extract entry 0x736F705F (Offset and length are outside the bounds of the array or the number is greater than the number of elements from index to the end of the source collection.)
Failed to extract entry 0x746F6F72 (Offset and length are outside the bounds of the array or the number is greater than the number of elements from index to the end of the source collection.)
Failed to extract entry 0x0 (offset and length are outside the bounds of the array or the number is greater than the number of elements from index to the end of the source collection.)
Failed to extract entry 0xB80B0000 (Non-negative number required.
Parameter name: offset)
---------------------------
Complete. 0/8 entries extracted
  Reply
#15
Yeah, I don't know about that. Do a less than zero of out of bounds check before attempt to extract data.
[Image: 30xhrep.png]

A casual conversation between barata and I about Nukem.
  Reply
#16
But, it's all invalid.
Not just some of them, every single one. I already tried larger files and it had the same result.
Am I encoding it wrong or something?
  Reply
#17
I don't know. I can't tell without seeing any code.
[Image: 30xhrep.png]

A casual conversation between barata and I about Nukem.
  Reply
#18
Turns out entryoffset always is 0x0.
Also

CSHARP Code
  1. using (BinaryReader fs = new BinaryReader(File.OpenRead(filename)))
  2. {
  3. //read header
  4. fs.ReadBytes(20);
  5. entrycount = fs.ReadInt32();
  6. fs.ReadBytes(4); // start offset
  7. fs.ReadBytes(4); // unknown
  8. fs.ReadBytes(4); // hashes?
  9.  
  10. entryoffset = fs.ReadInt32();
  11. fs.BaseStream.Seek(entryoffset, SeekOrigin.Begin);
  12. for (int i = 0; i < entrycount; i++)
  13. {
  14. //create entrys
  15. fs.ReadBytes(4);
  16. SABSEntry sabs = new SABSEntry { Offset = fs.ReadInt32(), Size = fs.ReadInt32(), Parent = this, InternalIndex = i };
  17. fs.ReadBytes(8);
  18. if(sabs.Size != 0)
  19. entries.Add(sabs);
  20. internalentries.Add(sabs);
  21. }
  22. }


Pretty much what you send me.
  Reply
#19
I made a mistake, please check the previous page again.
[Image: 30xhrep.png]

A casual conversation between barata and I about Nukem.
[-] The following 1 user says Thank You to master131 for this post:
  • JariZ
  Reply
#20
Yea, I noticed, Checked out your struct and solved it already.
Thanks!
  Reply


Possibly Related Threads...
Thread Author Replies Views Last Post
  Help mod not reading .iwd files? hmann 4 1,854 10-13-2013, 20:14
Last Post: hmann
  i need help with the sabs files duckywson 2 1,118 08-31-2013, 19:46
Last Post: duckywson
  Help How do I open the admin menu for GeKKos QS Mod? conorr 1 1,189 08-15-2013, 13:52
Last Post: Yamato
  .FF Files tugay12 1 1,681 08-14-2013, 17:11
Last Post: DidUknowiPwn
Question Help Upgrade my point system from files to Database, help? EnVi Sweden Rocks 11 3,709 08-03-2013, 23:31
Last Post: EnVi Sweden Rocks
  Help GSC Reading Files?! Howl3r 11 2,988 07-30-2013, 04:00
Last Post: DidUknowiPwn
Question Help what program, open and edit plugins ??? lexa__33 1 1,215 06-24-2013, 09:36
Last Post: EnVi Sweden Rocks
Wink [Tutorial] Playing mp3,mid,etc... audio files on VB 2010! barata 2 15,578 05-07-2013, 08:03
Last Post: kmne68
Music unlimited breath scope+sound when walking aim LE3* 0 906 04-21-2013, 08:42
Last Post: LE3*
  ranked server files for mw3 with DLC odok 5 2,041 04-19-2013, 12:09
Last Post: Nekochan

Forum Jump:


Users browsing this thread: 1 Guest(s)