Skip to: Site menu | Main content


Welcome to PSP-Programming.com, a place for developers to get together.

Welcome to the forums. Here you can find other user tutorials as well as homebrew releases and the source code repository. You can also ask for help with your code here and post your own homebrew!

PSP-Programming.com Forums
February 08, 2012, 07:04:41 PM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length

News: Check out the Code Section!
Home Help Search Shop Login Register
Digg This!
Pages: [1] 2
Print
Author Topic: [C] PSP Advaced Audio Library  (Read 5681 times)
Arshia001

C/C++ Developer
Sr. Member
*

Karma: +42/-41
Offline Offline

Posts: 268
1224.39 points

View Inventory
Send Money to Arshia001

View Profile
« on: June 21, 2009, 10:33:14 PM »

After solving a number of stability issues,I've finally decided that PSPAALIB is ready.I don't say it's completely bug free,but it should work fine for the most part.

For those of you who don't know,the PSPAALIB is essentially an audio library,which has the following features:

Plays MP3 via the PSP's Media Engine,
Plays MP3 via LibMAD,
Plays WAV,
Plays AT3,
Plays OGG,
Plays up to 8 files at once,using pspaudio,
Supports a number of effects,such as Play Speed,Doppler effect,etc.
Is easy to use.(Minimum of 2 function calls to play a file.)

Installation:
Copy PSPAALIB folder to your project's folder,include pspaalib.h,and add the information in my makefile to yours.Read the included Readme for information on how to use the lib.

I'm hoping to have a sample up in a few days.

Any feature requests,bug reports,suggestions and comments are welcome.

P.S.Since the last topic was more like a progress report/discussion thread,I decided to create a new topic. Mr. Green

-------------------------------

Thanx to Zack,a very important bug in the lib has been successfully sent on a one-way train to the depths of hell. Wink
Also fixed(Thanx to Zack for the bug report again) is an issue with threading which caused the lib to stop functioning after multiple calls to AalibPlay().
So,that means we now have update 2.Enjoy.

-------------------------------

And yet another update.This time,I expanded the WAV player.It now supports 8/16 bits per sample.In the past,it supported only 16,and would try to play others,but failed miserably.It will throw a warning now instead.That's update 3,and in one day...You're a bug-finding machine,Zack. Wink

-------------------------------

I've been meaning to do this for a very long time now.Where you can use AalibSetVolume() to decrease the volume,you should also be able to increase the volume over the maximum,and now you are.With the new AMPLIFY effect,you can amplify files that are recorded at a low volume.Files that are recorded right can't play louder,and you'll get lots of static if you try it.
« Last Edit: July 30, 2009, 01:45:30 AM by Arshia001 » Logged

Check out this audio library:
http://www.psp-programming.com/forums/index.php/topic,4338.0.html

Thanks for all the Karma,you guys!


@rt
You can't just sculpt Willie-Nillie. You've got to go by the book. Follow the rules. Otherwise, you'll never get passed Amateur Hour, here.
Newbie
*

Karma: +0/-0
Offline Offline

Posts: 18
2026.32 points

View Inventory
Send Money to @rt

View Profile
« Reply #1 on: July 22, 2009, 01:15:04 AM »

Hi,
I was reading through the other thread, and it may show lack of imagination on my part,
but why would anyone want or need to play more than two mp3s at once?
I can understand a background mp3 and wav sound effects for game apps, but that's about it.

Good work BTW Smile
Art.
Logged
Arshia001

C/C++ Developer
Sr. Member
*

Karma: +42/-41
Offline Offline

Posts: 268
1224.39 points

View Inventory
Send Money to Arshia001

View Profile
« Reply #2 on: July 23, 2009, 10:29:19 PM »

More than 2 MP3's would prove unnecessary.You will need two to create crossfading effects,or simply to avoid loading them each time you need them if you use ONLY two in your whole app.Your idea of wav sound effects is exactly what this whole thing is about.

Thanx.
Logged

Check out this audio library:
http://www.psp-programming.com/forums/index.php/topic,4338.0.html

Thanks for all the Karma,you guys!
kohaistyle
Newbie
*

Karma: +0/-0
Offline Offline

Posts: 3
212.68 points

View Inventory
Send Money to kohaistyle

View Profile
« Reply #3 on: November 16, 2009, 07:56:18 AM »

Hi guys ...

I'm a new guy trying to get something out of his psp Smile
Glad to meet you all

By any chance, has anyone got Arshia's audio lib hosted somewhere ? Seems the forums lost the file, and i can't seem to get 'libaudio2' ( newer sound lib ) to compile ...

Thx a bunch to anyone !
Logged
Arshia001

C/C++ Developer
Sr. Member
*

Karma: +42/-41
Offline Offline

Posts: 268
1224.39 points

View Inventory
Send Money to Arshia001

View Profile
« Reply #4 on: November 17, 2009, 10:31:05 AM »

...can't play louder,and you'll get lots of static if you try it. 

--------------------------------------------------------------------------------
 PSPAALIB Update 4.zip (20.97 KB - downloaded 23 times.)
 
« Last Edit: July 30, 2009, 02:15:30 PM by Arshia001 »  ...
 
It's there alright...
Logged

Check out this audio library:
http://www.psp-programming.com/forums/index.php/topic,4338.0.html

Thanks for all the Karma,you guys!
mowglisanu

C/C++ Developer
Hero Member
*

Karma: +36/-11
Offline Offline

Posts: 787
0.00 points

View Inventory
Send Money to mowglisanu


View Profile
« Reply #5 on: November 17, 2009, 11:48:39 AM »

>It's there alright...
Try downloading it.
Logged

Check out my:
 Audio lib
 Pmf Viewer
AlphaDingDong
Combat Muskrat
All-Around Dev
Hero Member
*

Karma: +32/-3
Offline Offline

Posts: 882
2044.69 points

View Inventory
Send Money to AlphaDingDong
Hey... Are you gonna eat that?


View Profile
« Reply #6 on: November 17, 2009, 01:46:26 PM »

I can has 404?
Logged
Arshia001

C/C++ Developer
Sr. Member
*

Karma: +42/-41
Offline Offline

Posts: 268
1224.39 points

View Inventory
Send Money to Arshia001

View Profile
« Reply #7 on: November 19, 2009, 10:13:58 PM »

Oh my...Seems there's something wrong with the forum's uploads section,so here's a 4shared link:

http://www.4shared.com/file/155721256/91af1433/PSPAALIB_Update_4.html
Logged

Check out this audio library:
http://www.psp-programming.com/forums/index.php/topic,4338.0.html

Thanks for all the Karma,you guys!
stinkee2
I thought the most important rule was "Why do today what you can put off 'till tomorrow"
Jr. Member
**

Karma: +5/-0
Offline Offline

Posts: 62
663.93 points

View Inventory
Send Money to stinkee2
Im so thirsty I could eat a house - Stinkee2


View Profile
« Reply #8 on: November 30, 2009, 05:07:58 PM »

Umm WTF?
Not changing anything I Get This:

Code:
EGPFiles\Audio\pspaalibcommon.h|152|error: redeclaration of C++ built-in type 'bool'|

when I remove the line that causes that Error I Get this:

Code:
EGPFiles\Audio\pspaalibwav.h|17|error: expected '=', ',', ';', 'asm' or '__attribute__' before 'GetPausedWav'|
EGPFiles\Audio\pspaalibwav.h|18|error: expected declaration specifiers or '...' before 'bool'|
EGPFiles\Audio\pspaalibwav.h|26|error: expected declaration specifiers or '...' before 'bool'|
EGPFiles\Audio\pspaalibscemp3.h|17|error: expected '=', ',', ';', 'asm' or '__attribute__' before 'GetPausedSceMp3'|
EGPFiles\Audio\pspaalibscemp3.h|18|error: expected declaration specifiers or '...' before 'bool'|
EGPFiles\Audio\pspaalibmadmp3.h|17|error: expected '=', ',', ';', 'asm' or '__attribute__' before 'GetPausedMadMp3'|
EGPFiles\Audio\pspaalibmadmp3.h|18|error: expected declaration specifiers or '...' before 'bool'|
EGPFiles\Audio\pspaalibogg.h|17|error: expected '=', ',', ';', 'asm' or '__attribute__' before 'GetPausedOgg'|
EGPFiles\Audio\pspaalibogg.h|18|error: expected declaration specifiers or '...' before 'bool'|
EGPFiles\Audio\pspaalibogg.h|26|error: expected declaration specifiers or '...' before 'bool'|
EGPFiles\Audio\pspaalibat3.h|17|error: expected '=', ',', ';', 'asm' or '__attribute__' before 'GetPausedAt3'|
EGPFiles\Audio\pspaalibat3.h|18|error: expected declaration specifiers or '...' before 'bool'|
EGPFiles\Audio\pspaalibeffects.h|19|error: expected declaration specifiers or '...' before 'bool'|
EGPFiles\Audio\pspaalib.h|185|error: expected declaration specifiers or '...' before 'bool'|
EGPFiles\Audio\pspaalib.h|260|error: expected declaration specifiers or '...' before 'bool'|
EGPFiles\Audio\pspaalib.c|16|error: expected specifier-qualifier-list before 'bool'|
EGPFiles\Audio\pspaalib.c||In function 'GetProcessedBuffer':|
EGPFiles\Audio\pspaalib.c|96|error: 'AalibChannelData' has no member named 'effects'|
EGPFiles\Audio\pspaalib.c|98|error: 'AalibChannelData' has no member named 'volume'|
EGPFiles\Audio\pspaalib.c|98|error: 'AalibChannelData' has no member named 'position'|
EGPFiles\Audio\pspaalib.c|100|error: 'AalibChannelData' has no member named 'effects'|
EGPFiles\Audio\pspaalib.c|102|error: 'AalibChannelData' has no member named 'volume'|
EGPFiles\Audio\pspaalib.c|104|error: 'AalibChannelData' has no member named 'effects'|
EGPFiles\Audio\pspaalib.c|106|error: 'AalibChannelData' has no member named 'audioStrength'|
EGPFiles\Audio\pspaalib.c|106|error: 'AalibChannelData' has no member named 'position'|
EGPFiles\Audio\pspaalib.c|110|error: 'AalibChannelData' has no member named 'audioStrength'|
EGPFiles\Audio\pspaalib.c|113|error: 'AalibChannelData' has no member named 'effects'|
EGPFiles\Audio\pspaalib.c|115|error: 'AalibChannelData' has no member named 'playSpeed'|
EGPFiles\Audio\pspaalib.c|115|error: 'AalibChannelData' has no member named 'position'|
EGPFiles\Audio\pspaalib.c|115|error: 'AalibChannelData' has no member named 'velocity'|
EGPFiles\Audio\pspaalib.c|117|error: 'AalibChannelData' has no member named 'effects'|
EGPFiles\Audio\pspaalib.c|119|error: 'AalibChannelData' has no member named 'playSpeed'|
EGPFiles\Audio\pspaalib.c|121|error: 'AalibChannelData' has no member named 'effects'|
EGPFiles\Audio\pspaalib.c|123|error: 'AalibChannelData' has no member named 'ampValue'|
EGPFiles\Audio\pspaalib.c|126|error: 'AalibChannelData' has no member named 'effects'|
EGPFiles\Audio\pspaalib.c|126|error: 'AalibChannelData' has no member named 'effects'|
EGPFiles\Audio\pspaalib.c|126|error: 'AalibChannelData' has no member named 'effects'|
EGPFiles\Audio\pspaalib.c|129|error: 'AalibChannelData' has no member named 'playSpeed'|
EGPFiles\Audio\pspaalib.c|130|error: 'AalibChannelData' has no member named 'playSpeed'|
EGPFiles\Audio\pspaalib.c|130|error: 'AalibChannelData' has no member named 'ampValue'|
EGPFiles\Audio\pspaalib.c|131|error: 'AalibChannelData' has no member named 'playSpeed'|
EGPFiles\Audio\pspaalib.c|131|error: 'AalibChannelData' has no member named 'effects'|
EGPFiles\Audio\pspaalib.c|131|error: too many arguments to function 'GetBufferSpeedEffect'|
EGPFiles\Audio\pspaalib.c|136|error: 'AalibChannelData' has no member named 'ampValue'|
EGPFiles\Audio\pspaalib.c||In function 'PlayThread':|
EGPFiles\Audio\pspaalib.c|174|error: 'AalibChannelData' has no member named 'volume'|
EGPFiles\Audio\pspaalib.c|174|error: 'AalibChannelData' has no member named 'audioStrength'|
EGPFiles\Audio\pspaalib.c|174|error: 'AalibChannelData' has no member named 'volume'|
EGPFiles\Audio\pspaalib.c|174|error: 'AalibChannelData' has no member named 'audioStrength'|
EGPFiles\Audio\pspaalib.c||In function 'AalibSetAmplification':|
EGPFiles\Audio\pspaalib.c|219|error: 'AalibChannelData' has no member named 'ampValue'|
EGPFiles\Audio\pspaalib.c||In function 'AalibSetVolume':|
EGPFiles\Audio\pspaalib.c|229|error: 'AalibChannelData' has no member named 'volume'|
EGPFiles\Audio\pspaalib.c||In function 'AalibSetPlaySpeed':|
EGPFiles\Audio\pspaalib.c|239|error: 'AalibChannelData' has no member named 'playSpeed'|
||More errors follow but not being shown.|
||Edit the max errors limit in compiler options...|

I looked at the 'AalibChannelData' Struct and it does infact have all those members the compiler said It didnt

What Is going on???
Logged

Dumping... 0.000001%, Speed: 1 byte/h.
An Abort of this application will corrupt your BIOS,Void your warranty, and Render your computer useless.
Please wait...
mowglisanu

C/C++ Developer
Hero Member
*

Karma: +36/-11
Offline Offline

Posts: 787
0.00 points

View Inventory
Send Money to mowglisanu


View Profile
« Reply #9 on: November 30, 2009, 05:58:38 PM »

Why would you think removing the line would fix it?
You should rename bool to something like boolean, that might be some work since it looks like its in all the files.
Logged

Check out my:
 Audio lib
 Pmf Viewer
stinkee2
I thought the most important rule was "Why do today what you can put off 'till tomorrow"
Jr. Member
**

Karma: +5/-0
Offline Offline

Posts: 62
663.93 points

View Inventory
Send Money to stinkee2
Im so thirsty I could eat a house - Stinkee2


View Profile
« Reply #10 on: November 30, 2009, 10:53:20 PM »

to be honest, I have no Idea... I was and still am really tired. I Need Sleep.

thanks for the help, Ill try that tomorrow
Logged

Dumping... 0.000001%, Speed: 1 byte/h.
An Abort of this application will corrupt your BIOS,Void your warranty, and Render your computer useless.
Please wait...
Arshia001

C/C++ Developer
Sr. Member
*

Karma: +42/-41
Offline Offline

Posts: 268
1224.39 points

View Inventory
Send Money to Arshia001

View Profile
« Reply #11 on: December 01, 2009, 06:19:13 AM »

Say,if gcc is a C compiler,why does it keep telling people bool is a pre-defined C++ type?Besides,I had no problem compiling the code myself,and there aren't exactly a thousand compilers for the PSP...Could it be that -lstdc++ is causing this?
Anyway,I can't be sure,but I think renaming bool to something else is sure to fix the problem.Could you tell me if it does?
Logged

Check out this audio library:
http://www.psp-programming.com/forums/index.php/topic,4338.0.html

Thanks for all the Karma,you guys!
mowglisanu

C/C++ Developer
Hero Member
*

Karma: +36/-11
Offline Offline

Posts: 787
0.00 points

View Inventory
Send Money to mowglisanu


View Profile
« Reply #12 on: December 01, 2009, 09:44:14 AM »

>Say,if gcc is a C compiler,why does it keep telling people bool is a pre-defined C++ type?

I'm sure he was working on his Easy Graphics - Physics Library which is in C++.
You could also try including stdbool.h.
Logged

Check out my:
 Audio lib
 Pmf Viewer
stinkee2
I thought the most important rule was "Why do today what you can put off 'till tomorrow"
Jr. Member
**

Karma: +5/-0
Offline Offline

Posts: 62
663.93 points

View Inventory
Send Money to stinkee2
Im so thirsty I could eat a house - Stinkee2


View Profile
« Reply #13 on: December 01, 2009, 12:50:23 PM »

I'm sure he was working on his Easy Graphics - Physics Library which is in C++.
You could also try including stdbool.h.

Yes, I was actually. I should have started a seperate project for this to test it.

this is a little off topic but, where would I start for Implementing Audio loading & Playing into my Library?
should I integrate a pre-made library (Giving credit where credit is due of course)?

also, Do you think that what Im doing is a good Idea? or should I just stop.
Logged

Dumping... 0.000001%, Speed: 1 byte/h.
An Abort of this application will corrupt your BIOS,Void your warranty, and Render your computer useless.
Please wait...
Arshia001

C/C++ Developer
Sr. Member
*

Karma: +42/-41
Offline Offline

Posts: 268
1224.39 points

View Inventory
Send Money to Arshia001

View Profile
« Reply #14 on: December 02, 2009, 11:20:26 AM »

I don't really think you can make it any easier than we (mowgli and me) have made it.You should concentrate more on finishing what you've started than trying to add to your to-do list.I tried this,and every single time when I kept thinking of new things to do,I ended up doing nothing at all.If you ask me,keep working on your gfx/physx lib(specially the physx part).That's what we really need around here.
Logged

Check out this audio library:
http://www.psp-programming.com/forums/index.php/topic,4338.0.html

Thanks for all the Karma,you guys!
Pages: [1] 2
Print
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!
Page created in 0.178 seconds with 38 queries.
Sister Sites: Guitar Hero 4   BrokeniTouch.com