Thread: Need information on sounds

Page 1 of 2 12 LastLast
Results 1 to 10 of 11
  1. #1 Need information on sounds 
    Contributor

    clem585's Avatar
    Join Date
    Sep 2013
    Posts
    3,788
    Thanks given
    706
    Thanks received
    702
    Rep Power
    570
    Managed to make a decoder for index4 (sound_effects_1) for my 742 cache but I was wondering how to convert the data in the classes into a readable audio stream. Anybody knows where I should look (I've tried checking in the client but there's way too much stuff to adapt). Even old rune-server threads I've missed would be useful.

    Edit: Found this but I don't think it's the same sound index, or at least the decoder changed alot.

    Edit2: After looking at the previous link I can sort of understand the main "Effect" class, would I just use data() to get the audio buffer?
    Project thread
    Reply With Quote  
     

  2. #2  
    Contributor

    clem585's Avatar
    Join Date
    Sep 2013
    Posts
    3,788
    Thanks given
    706
    Thanks received
    702
    Rep Power
    570
    bump
    Project thread
    Reply With Quote  
     

  3. #3  
    Contributor

    clem585's Avatar
    Join Date
    Sep 2013
    Posts
    3,788
    Thanks given
    706
    Thanks received
    702
    Rep Power
    570
    bump
    Project thread
    Reply With Quote  
     

  4. #4  
    Contributor

    clem585's Avatar
    Join Date
    Sep 2013
    Posts
    3,788
    Thanks given
    706
    Thanks received
    702
    Rep Power
    570
    bump, nobody?
    Project thread
    Reply With Quote  
     

  5. #5  
    Registered Member

    Join Date
    Dec 2009
    Posts
    774
    Thanks given
    367
    Thanks received
    455
    Rep Power
    927
    Jagex uses their own instruments to play sounds/musics (effects). Just writing the data byte array to a file will not work, you need more than that.
    link removed
    Reply With Quote  
     

  6. #6  
    Contributor

    clem585's Avatar
    Join Date
    Sep 2013
    Posts
    3,788
    Thanks given
    706
    Thanks received
    702
    Rep Power
    570
    Quote Originally Posted by Admiral Slee View Post
    Jagex uses their own instruments to play sounds/musics (effects). Just writing the data byte array to a file will not work, you need more than that.
    Huh I found this in the client (where aClass292Array3060 is instruments):

    Code:
    final byte[] method2984() {
    		int i = 0;
    		for (int i_4_ = 0; i_4_ < 10; i_4_++) {
    			if (aClass292Array3060[i_4_] != null && ((((UnknownSoundClass1) aClass292Array3060[i_4_]).anInt2996) + (((UnknownSoundClass1) aClass292Array3060[i_4_]).anInt2984)) > i)
    				i = ((((UnknownSoundClass1) aClass292Array3060[i_4_]).anInt2996) + (((UnknownSoundClass1) aClass292Array3060[i_4_]).anInt2984));
    		}
    		if (i == 0)
    			return new byte[0];
    		int i_5_ = 22050 * i / 1000;
    		byte[] is = new byte[i_5_];
    		for (int i_6_ = 0; i_6_ < 10; i_6_++) {
    			if (aClass292Array3060[i_6_] != null) {
    				int i_7_ = ((((UnknownSoundClass1) aClass292Array3060[i_6_]).anInt2996) * 22050 / 1000);
    				int i_8_ = ((((UnknownSoundClass1) aClass292Array3060[i_6_]).anInt2984) * 22050 / 1000);
    				int[] is_9_ = (aClass292Array3060[i_6_].method2909(i_7_, ((UnknownSoundClass1) (aClass292Array3060[i_6_])).anInt2996));
    				for (int i_10_ = 0; i_10_ < i_7_; i_10_++) {
    					int i_11_ = is[i_10_ + i_8_] + (is_9_[i_10_] >> 8);
    					if ((i_11_ + 128 & ~0xff) != 0)
    						i_11_ = i_11_ >> 31 ^ 0x7f;
    					is[i_10_ + i_8_] = (byte) i_11_;
    				}
    			}
    		}
    		return is;
    	}
    But I'm guessing I'd have to track down more modifications to that buffer right?
    Project thread
    Reply With Quote  
     

  7. #7  
    Contributor

    clem585's Avatar
    Join Date
    Sep 2013
    Posts
    3,788
    Thanks given
    706
    Thanks received
    702
    Rep Power
    570
    bump, anybody got this working/refactored ever?
    Project thread
    Reply With Quote  
     

  8. #8  
    Contributor

    clem585's Avatar
    Join Date
    Sep 2013
    Posts
    3,788
    Thanks given
    706
    Thanks received
    702
    Rep Power
    570
    bump
    Project thread
    Reply With Quote  
     

  9. #9  
    Contributor

    clem585's Avatar
    Join Date
    Sep 2013
    Posts
    3,788
    Thanks given
    706
    Thanks received
    702
    Rep Power
    570
    bump, if anything anyone wanna try and get a working sound decoder/encoder together with me?

    Got it working, message me if you need help.
    Project thread
    Reply With Quote  
     

  10. #10  
    Registered Member

    Join Date
    Dec 2009
    Posts
    774
    Thanks given
    367
    Thanks received
    455
    Rep Power
    927
    Quote Originally Posted by clem585 View Post
    bump, if anything anyone wanna try and get a working sound decoder/encoder together with me?

    Got it working, message me if you need help.
    Can you now actually dump midi's and jingle's?
    Reply With Quote  
     

Page 1 of 2 12 LastLast

Thread Information
Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)


User Tag List

Similar Threads

  1. Replies: 0
    Last Post: 02-24-2013, 11:28 AM
  2. Replies: 19
    Last Post: 03-03-2008, 06:41 PM
  3. Replies: 8
    Last Post: 01-25-2008, 02:46 AM
  4. Need help on renamed client... lol
    By newservermaker in forum RS2 Client
    Replies: 4
    Last Post: 01-07-2008, 08:04 AM
  5. Need Tut On Editing Weapon Bonus
    By Valkynaz in forum Tutorials
    Replies: 2
    Last Post: 06-03-2007, 05:58 AM
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •