Java-Gaming.org    
Featured games (81)
games approved by the League of Dukes
Games in Showcase (499)
Games in Android Showcase (118)
games submitted by our members
Games in WIP (568)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  Libgdx Request -> Expose OpenAL sourceIDs  (Read 659 times)
0 Members and 1 Guest are viewing this topic.
Offline Cero
« Posted 2013-09-19 21:21:03 »

Changing the pitch with a libgdx music object is not possible. Reason is that the android backend can't handle it or whatever.

So, since I have many PC only libgdx projects, I just wanted to hack it in using lwjgl:
1  
org.lwjgl.openal.AL10.alSourcef(SOURCE_ID, org.lwjgl.openal.AL10.AL_PITCH,  PITCH_AMOUNT);

right.

However there is noooo way that I can see that you can actually get the source id from a music object.
I looked at the lwjgl backend source and it is there obviously "private int sourceID", its just not exposed via getter.
I understand its kinda low level and stuff, but can I request that you add this guys ?  I mean I am doing the pitching myself already, just give me the sourceID :D

Offline Nate

JGO Kernel


Medals: 149
Projects: 4
Exp: 14 years


Esoteric Software


« Reply #1 - Posted 2013-09-19 21:26:50 »

Done.

Offline Cero
« Reply #2 - Posted 2013-09-19 21:48:18 »

As a token of appreciation, here is a picture of daigo and justin. (Because I know you like Street Fighter :D)



Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline Nate

JGO Kernel


Medals: 149
Projects: 4
Exp: 14 years


Esoteric Software


« Reply #3 - Posted 2013-09-19 23:05:30 »

Haha, cool. Well, Daigo is cool, Justin isn't.

Offline davedes
« Reply #4 - Posted 2013-09-20 14:15:23 »

However there is noooo way that I can see that you can actually get the source id from a music object.
I looked at the lwjgl backend source and it is there obviously "private int sourceID", its just not exposed via getter.
I understand its kinda low level and stuff, but can I request that you add this guys ?  I mean I am doing the pitching myself already, just give me the sourceID Cheesy
You can always submit pull requests through GitHub. Smiley

Offline Cero
« Reply #5 - Posted 2013-09-23 00:36:30 »

However there is noooo way that I can see that you can actually get the source id from a music object.
I looked at the lwjgl backend source and it is there obviously "private int sourceID", its just not exposed via getter.
I understand its kinda low level and stuff, but can I request that you add this guys ?  I mean I am doing the pitching myself already, just give me the sourceID Cheesy
You can always submit pull requests through GitHub. Smiley

I'm not pro at git, meaning I never did a pull request, but I'm not a total beginner...
so I just pull libgdx, do this specific change, and then do a pull request and there you go ?

Offline davedes
« Reply #6 - Posted 2013-09-23 02:33:04 »

Basic steps are as follows..

1. Get git command line client or the GitHub application for Win/Mac.

2. Find the repo you want to patch up:
https://github.com/libgdx/libgdx

3. Click the "Fork" button in the top right. This will create a libgdx repo under your name.

4. Click "Clone in Desktop" (if you're using the GUI app) or use the following command:
1  
2  
cd /path/to/projects
git clone https://github.com/libgdx/libgdx.git


Note the first line simply cd's to the directory where you want to store all your github repos. I keep mine in
/projects
for quick typing.

5. Now you need to run the following to get LibGDX repo up and running:
1  
2  
cd libgdx
ant -f fetch.xml


The first line cd's into the libgdx repo you just cloned. The second pulls all the JARs and binaries.

6. Run Eclipse and choose File -> Import -> Existing Project into Workspace and open the libgdx folder. You will see a bunch of projects, you can select them all. I'd strongly encourage using Eclipse's Working Sets (or a different workspace) to avoid cluttering with your own projects.

7. Make some changes and push them back to master with:
1  
2  
3  
git add -A .
git commit -m "your commit message"
git push


(This is done in the libgdx directory you cloned earlier)

8. Open your GitHub forked repo:
https://github.com/YOUR-USERNAME/libgdx

And choose "Compare" (above "latest commit" line). From there you can click "Create a pull request"



Seems complicated but once you get the hang of it you'll find yourself patching up a lot of open source projects. Smiley

Pages: [1]
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

Pippogeek (41 views)
2014-09-24 16:13:29

Pippogeek (32 views)
2014-09-24 16:12:22

Pippogeek (22 views)
2014-09-24 16:12:06

Grunnt (47 views)
2014-09-23 14:38:19

radar3301 (30 views)
2014-09-21 23:33:17

BurntPizza (65 views)
2014-09-21 02:42:18

BurntPizza (37 views)
2014-09-21 01:30:30

moogie (44 views)
2014-09-21 00:26:15

UprightPath (53 views)
2014-09-20 20:14:06

BurntPizza (55 views)
2014-09-19 03:14:18
List of Learning Resources
by Longor1996
2014-08-16 10:40:00

List of Learning Resources
by SilverTiger
2014-08-05 19:33:27

Resources for WIP games
by CogWheelz
2014-08-01 16:20:17

Resources for WIP games
by CogWheelz
2014-08-01 16:19:50

List of Learning Resources
by SilverTiger
2014-07-31 16:29:50

List of Learning Resources
by SilverTiger
2014-07-31 16:26:06

List of Learning Resources
by SilverTiger
2014-07-31 11:54:12

HotSpot Options
by dleskov
2014-07-08 01:59:08
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!