Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.
Sign upProposal: switch iOS and Android audio to Superpowered #3173
Comments
|
Yesyesyes. Any ogg support? ----- Reply message ----- See: http://superpowered.com/#axzz3bKHPWovT Comments? I'm sick of Android's audio APIs. Reply to this email directly or view it on GitHub: |
|
No Ogg support.
|
|
Well I'm game. Would it be a good idea to keep the old audio and deprecate? Or just go for broke? |
|
We can keep both for now. Easy enough to have a config flag to pick the
|
|
Are you saying it has no ogg support at all? |
|
After having a brief look over things, I'd favor going the extension route over replacing the backend audio implementations with this SDK. |
|
you have a point. missing ogg support is something i could add.
|
|
it would be much better than what we have now. even without ogg support. |
|
Maybe, but someone would have to build the java wrapper and vet the licensing terms before we can find out. |
|
Yeah, i'll do that :) On Tue, Jun 9, 2015 at 3:26 PM, Justin Shapcott notifications@github.com
|
|
This would be awesome! Thanks Mario! |
|
Any news on that? |
|
Nope
|
|
A few concerns:
Let's keep Libgdx as open source friendly as possible! |
|
On Jun 30, 2015 12:31 PM, "David Saltares" notifications@github.com wrote:
Agreed, they are in our favor though, and we'll always have the default
I do not think this is a concern if this is an extension.
Yes, we should be able to add this via the integer vorbis decoder by Xiph.
No, the API stays the same. Think switching out Gdx.sound.
We already have this 'problem' with the default implementation.
Word |
|
As long as we make it an extension and support an open audio format with high compression rates in all platforms I am sold. |
|
As for licensing, people using the library are required to put somewhere
conspicuous in their app "Audio by Superpowered" with their logo and link
to their site, as well as put the same in their product listing in app
stores... Which we'll want to make clear to users as this sort of thing is
not required by libgdx itself.
|
|
In that case, I would vote for never making it part of core Libgdx but an Now the problem is, do we want to maintain the original core audio backends On 1 July 2015 at 00:37, Justin Shapcott notifications@github.com wrote:
David Saltares Márquez Software Developer |
|
Of course we have to maintain the original core audio backends if this is an extension, otherwise it wouldn't make sense as an extension. |
|
I know, but there was also the discussion of eventually making it part of the core. If it forces you to place their logo in the game, we can never make it the only sound backend for Android and iOS. |
|
We won't, it will stay an extension.
|
Want! One of the first ideas I ever had for an Android app was to build an audio player where you could pitch shift with gestures :-P Just that there was no pitch shifting API. This would be great for games too (Braid anyone?) |
|
Regarding Built-in Pitch shifting, isn't that already possible by setting the pitch of your sounds? I remember using short looped sounds + updating pitch to do engine-sounds with libgdx a while ago. |
|
It might be. Last time I checked was like 5 years ago. On Sun, Aug 23, 2015 at 9:18 PM madpew notifications@github.com wrote:
|
|
Ok here are my experiences with Superpowered SDK. I'm using cocos2d-x currently and i got tired of all platform specific Audio problems. So i've checked out Superpowered SDK and started digging. I must say it works really good, gapless loops, low CPU and memory usage on all platforms, fast. I've made a wrapper around SDK for iOS/OSX/Android, with caching, pitching and all other needed features for a "normal" not music oriented game, but of course its not without problems. First of all i had problems with not stopping some of the mp3 files as well as other formats except WAV (WAV was always working flawlessly, but size is the biggest problem so i had to look for another solution). I've contacted authors of Superpowered SDK and they've told me to use AAC format, and i did, but the thing is it must be .aac (not m4a or any other), at first it was working good, but some of the small sounds couldn't be played, and i was getting File too small errors, so i had to switch some of the files to .wav (good thing is they are really small like 20-30kb). Also implementation for iOS and OSX is straightforward, but for Android i had to dig in with native asset manager to get needed sounds from assets directory, so a bit more to implement but its worth it (its all in c++ so i didn't have to make jni calls, except for apk path). Overall as i said, it works really great, only thing that i'm concern is that some of the files couldn't be played due to small size or just failed to read file (this happens on Android if using .m4a) or EOF was not called, so there is no way to know when sound is finished playing. Conclusion, keep it as extension for now. |
|
Hi @milos1290, did you have to copy an audio file from the assets folder to a temporary place to get the access to it from Superpowered? Or have you found a solution without doing so? |
|
No, you can read it directly from assets folder. There is native asset manager in ndk that can provide you with asset start position and length to read from. |
|
Oh, wow. Thank you very much @milos1290 ! For someone who may need this in the future: |
|
Not going to happen. |
|
@serhii-k I'm actually that person in the future trying to do this now: do you possibly have a bigger sample for how you managed to pass an asset for superpowered to load? I already have a working setup, just can't handle assets. In your snippet, what filename are you passing and where is the manager coming from, the app's AssetManager via JNI? Any help would be appreciated as I'm exactly in the same predicament! |
|
Hello @Guy-kun http://www.megafileupload.com/ak6c/CrossExample.zip Please, download this as a free user (click on such image two times). Here are my experiments with Superpowered. It didn't suite my needs, so I decided not to use it that time. So, I can't actually remember what's going on there, I just tested different features of the library. But I remember that this example takes audio files from the assets instead of the app resources. I hope it helps you. |
|
Thanks so much @serhii-k that helped a lot, after another day of tinkering I finally got it to work To save someone time in the future, in the end this is as simple as calling
and making sure to pass javaAssetManager through the JNI call retrieved from the activity using getContext().getAssets() as well as the apk path as provided by getPackageResourcePath() Thanks again! |
|
You are welcome @Guy-kun! :) |
|
I'd appreciate any code that has been done on this! |
|
There are several good examples inside their SDK. These are just random changes to one of them. |
See: http://superpowered.com/#axzz3bKHPWovT
Comments? I'm sick of Android's audio APIs.