Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

can you add a sample about loading and playing audio files? #26

Closed
readlnh opened this issue Mar 26, 2017 · 7 comments
Closed

can you add a sample about loading and playing audio files? #26

readlnh opened this issue Mar 26, 2017 · 7 comments
Labels

Comments

@readlnh
Copy link

readlnh commented Mar 26, 2017

I'm a beginner,and i have no idea about how to get audio working on the vita.The audio sample is not enough for me.Can you add a sample about:
1.Load the audio file's audio data into a buffer (somehow)
2.play it
Can you add a sample about how to load the mp3 and play it?
Sorry for my poor english

@devnoname120
Copy link
Member

devnoname120 commented Mar 26, 2017

EDIT: @ArkSource has done a library to play audio on the Vita, you might want to use it instead: https://github.com/ArkSource/vitaAudio

Decoding a MP3 and playing it using the Vita API is a very complicated task.

I suggest you instead to decode your MP3 to PCM using libmad, and feed that decoded PCM to sceAudioOutOutput(). You can take a look at the audio sample to see how to use this function.

If you have installed the vitasdk with the instructions from here, libmad should already be installed.

@readlnh
Copy link
Author

readlnh commented Mar 26, 2017

Thank you very much, i will have a try.

@devnoname120
Copy link
Member

devnoname120 commented Jul 16, 2017

@xyzz has ported soloud to the PS Vita. Just run ./install-all.sh again and you should be able to use this library. There is a sample of use here: https://github.com/xyzz/soloud-demo

@devnoname120
Copy link
Member

devnoname120 commented Aug 11, 2017

Fixed in e140147.
Soloud doesn't use the sce audio functions so no hardware-acceleration, but it should be fast enough anyway for most usages.

@readlnh
Copy link
Author

readlnh commented Aug 12, 2017

Thank you very much!

@yne
Copy link
Contributor

yne commented Aug 12, 2017

@devnoname120 Could you consider e140147#commitcomment-23168649

@devnoname120
Copy link
Member

@yne Sure, here it is: 2cd5610

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants