![]() |
| Forums | Gaming News | Videos | Downloads | Today's Posts | Mark Forums Read | Chat | FAQ | Members List | Contact |
| ||||||
This is a discussion on [RELEASE] Wavloader within the PSP Development Forum forums, part of the PSP Development, Hacks, and Homebrew category; Wav Loader A simple interface for utilising the MikMod library to play WAV files Version 0.1 Download -= Installing mikmodlib ...
![]() |
|
|
LinkBack | Thread Tools |
|
|
#1 | |
![]() ![]() Developer
|
Wav Loader
A simple interface for utilising the MikMod library to play WAV files ![]() Version 0.1 Download -= Installing mikmodlib =- At a Cygwin prompt type: svn checkout svn://svn.ps2dev.org/psp/trunk/mikmodlib When the files have finished downloading type: cd mikmodlib make install -= Samples =- In the 'Samples' directory within this archive there is example code on how to integrate wavloader. There are two examples currently. simple - Shows only the basic functions needed to load and play a WAV. advanced - Illustrates how to change the volume, pan and stopping a playing WAV. (When compiling these samples do not forget to put the 'sound.wav' file in the same folder as the EBOOT when moving onto the PSP) The samples and the wavloader.h are well commented so implementation should be simple. -= Version History =- Version 0.1 -- Initial Release
__________________
![]() Check out my homebrew & C tutorials at http://insomniac.0x89.org/ Coder formerly known as Insomniac197 Quote:
|
|
|
|
|
|
|
#5 | ||
![]() ![]() Developer
|
Quote:
__________________
![]() Check out my homebrew & C tutorials at http://insomniac.0x89.org/ Coder formerly known as Insomniac197 Quote:
|
||
|
|
|
|
|
#7 |
![]() ![]() Developer
|
Is this a set of functions for simplifying wav's with mikmod? I wrote my own interface to mikmod's wav functions but it's not very good and I can only load one wav at a time or else it crashes.
I posted on the pspupdates page where I first saw this, but the people that already posted are making arses of themselves due to the fact that they do not understand the nature of this tool, lol. |
|
|
|
|
|
#8 | ||
![]() ![]() Developer
|
Quote:
It's just an example to show how to use the library.
__________________
![]() Check out my homebrew & C tutorials at http://insomniac.0x89.org/ Coder formerly known as Insomniac197 Quote:
|
||
|
|
|
|
|
#9 |
![]() ![]() Developer
|
Even a small size wav doesn't play WITH callbacks in WAVLOADER 0.2.
If I remove Exit Game Callback. Everything works. Is this normal?
__________________
Hardware Alarm Suite II v2.7 bld 1727 (1730 Latest)|Academic Aid 6.R769 w/ Motion|LocoRoco Motion Plugin|XmbController 1.61|More(32) TweakDISPLAY(NOW OUT!) | PaintOnXMB v1
|
|
|
|
|
|
#10 |
![]() ![]() Developer
|
Can't edit post.
I have worked with Wavloader in the past with many of my proggy's. But now, I wanted to clarify. If it was common.
__________________
Hardware Alarm Suite II v2.7 bld 1727 (1730 Latest)|Academic Aid 6.R769 w/ Motion|LocoRoco Motion Plugin|XmbController 1.61|More(32) TweakDISPLAY(NOW OUT!) | PaintOnXMB v1
|
|
|
|
|
|
#11 | |
![]() ![]() Developer
|
I'm unsure as I haven't used it at all since I released it.
I've attached pgeWav, which is a lot better - it also doesn't rely on mikmod or any external libraries. Usage should be pretty much straight forward. It also supports 8-bit mono/stereo and 16-bit mono/stereo files. I recommend sticking to 16-bit mono as the sound quality is the best, and it will be output as stereo anyway. pgeWav comes with a 'mention PGE in your release' licence ![]() Code:
#include <pspkernel.h>
#include <pspctrl.h>
#include <pspaudio.h>
#include <pspdebug.h>
#include <pge/pge.h>
// Include our bin2c'd WAV file (see makefile for how it was created)
#include "eightbitmono.c"
// Our bin2o'd file (see makefile for how it was created)
extern unsigned char eightbitstereo_start[];
extern int eightbitstereo_size;
int main(int argc, char*argv[])
{
pspDebugScreenInit();
// Init controls
pgeControlsInit();
// Init WAV playback
pgeWavInit();
// Load our WAV files
// Load from memory
pgeWav* wav8M = pgeWavLoadMemory(eightbitmono, size_eightbitmono);
pgeWav* wav8S = pgeWavLoadMemory(eightbitstereo_start, eightbitstereo_size);
// Load from file
pgeWav* wav16M = pgeWavLoad("16bitmono.wav");
pgeWav* wav16S = pgeWavLoad("16bitstereo.wav");
pspDebugScreenPrintf("Press CROSS to play 8 bit mono sample\n");
pspDebugScreenPrintf("Press SQUARE to play 8 bit stereo sample\n");
pspDebugScreenPrintf("Press TRIANGLE to play 16 bit mono sample\n");
pspDebugScreenPrintf("Press CIRCLE to play 16 bit stereo sample\n\n");
pspDebugScreenPrintf("Press START to stop all WAVs currently playing\n");
pspDebugScreenPrintf("Press SELECT to set loop\n");
while(pgeRunning())
{
// Update controller data
pgeControlsUpdate();
if(pgeControlsPressed(PSP_CTRL_CROSS))
pgeWavPlay(wav8M);
if(pgeControlsPressed(PSP_CTRL_CIRCLE))
pgeWavPlay(wav16S);
if(pgeControlsPressed(PSP_CTRL_SQUARE))
pgeWavPlay(wav8S);
if(pgeControlsPressed(PSP_CTRL_TRIANGLE))
pgeWavPlay(wav16M);
if(pgeControlsPressed(PSP_CTRL_START))
pgeWavStopAll();
if(pgeControlsPressed(PSP_CTRL_SELECT))
pgeWavLoop(wav16M, 1);
}
// Unload the WAVs
pgeWavUnload(wav8M);
pgeWavUnload(wav8S);
pgeWavUnload(wav16M);
pgeWavUnload(wav16S);
// Shutdown WAV playback
pgeWavShutdown();
// Shutdown controls
pgeControlsShutdown();
pgeExit();
return 0;
}
Obviously it won't compile because it relies on the rest of PGE, but it should show how it's used etc.
__________________
![]() Check out my homebrew & C tutorials at http://insomniac.0x89.org/ Coder formerly known as Insomniac197 Quote:
|
|
|
|
|
|
|
#12 | |
![]() ![]() Developer
|
Quote:
Sounds nice... BUT... Switching to PGE for pgeWav ![]() Is any independent version possible?
__________________
Hardware Alarm Suite II v2.7 bld 1727 (1730 Latest)|Academic Aid 6.R769 w/ Motion|LocoRoco Motion Plugin|XmbController 1.61|More(32) TweakDISPLAY(NOW OUT!) | PaintOnXMB v1
|
|
|
|
|
|
|
#14 | ||
![]() ![]() Developer
|
Quote:
It's just the sample I posted that requires full PGE to compile. But, you should be able to see how pgeWav is used from that sample, so you know how to use it. Again, you do not need PGE to use pgeWav. You already use pgeFont, and will soon use pgeWav, is it that big a jump?
__________________
![]() Check out my homebrew & C tutorials at http://insomniac.0x89.org/ Coder formerly known as Insomniac197 Quote:
|
||
|
|
|
|
|
#15 | |
![]() ![]() Developer
|
Quote:
No mikmod = 200K smaller EBOOT Thanks! - Werent you part of triEngine?
__________________
Hardware Alarm Suite II v2.7 bld 1727 (1730 Latest)|Academic Aid 6.R769 w/ Motion|LocoRoco Motion Plugin|XmbController 1.61|More(32) TweakDISPLAY(NOW OUT!) | PaintOnXMB v1
|
|
|
|
|
|
|
#16 | |
![]() ![]() Developer
|
I was the 'I' in triEngine.
Tomaz, Raphael, InsertWittyName = TRI ![]() Most of the work I submitted was in PGE though, I just introduced it to TRI.
__________________
![]() Check out my homebrew & C tutorials at http://insomniac.0x89.org/ Coder formerly known as Insomniac197 Quote:
|
|
|
|
|
|
|
#18 |
![]() ![]() Developer
|
Also, Is there any pgeMP3 module or any software based decoder or Hardware Mp3 Decoder that takes care of Buffering stuff?
--- Few edits needed to get pgeWav working. 1) Add #include "pgeWav.h" 2) Remove pgeRunning() references --- Oh, and Wav sound a LOT more Louder with this compared to mikmod/wavloader
__________________
Hardware Alarm Suite II v2.7 bld 1727 (1730 Latest)|Academic Aid 6.R769 w/ Motion|LocoRoco Motion Plugin|XmbController 1.61|More(32) TweakDISPLAY(NOW OUT!) | PaintOnXMB v1
|
|
|
|
|
|
#19 | |
![]() ![]() Developer
|
I have pgeMp3 yes.
It plays MPEG1, MPEG2 and MPEG 2.5 at any bitrate and samplerate. Bitrates: 8, 16, 24, 32, 40, 48, 56, 64, 80, 96, 112, 128, 144, 160, 192, 224, 256, 320. Samplerates: 8000, 11025, 12000, 16000, 22050, 24000, 32000, 44100, 48000 It decodes using the ME in hardware and triple buffers the MP3 stream. It also decodes all the ID3 tags and makes them available to the user. I'm not willing to strip it out of PGE, so you'll have to use something else or wait for PGE
__________________
![]() Check out my homebrew & C tutorials at http://insomniac.0x89.org/ Coder formerly known as Insomniac197 Quote:
|
|
|
|
|
|
|
#20 |
![]() ![]() Developer
|
New problem... PgeWav doesn't seem to like MsgDialogs vice versa.
I have both netdialog and Msgdialogs running perfectly WITHOUT sound ![]() Newly this problem has arosen: Code:
host0:/> Exception - Breakpoint Thread ID - 0x04B2D56D Th Name - PgeAudioThread0 Exception - Breakpoint EPC - 0x0880CA94 Thread ID - 0x04B3DD55 Cause - 0x10000024 Exception - Breakpoint Th Name - audiot0 BadVAddr - 0xC8931140 Thread ID - 0x04B39B5B EPC - 0x08842964 Status - 0x00088613 Th Name - audiot1 Cause - 0x10000024 zr:0x00000000 at:0x2008FF00 v0:0x00000400 v1:0x8 EPC - 0x08842908 BadVAddr - 0xC8931140 Exception - Breakpoint a0:0x00000001 a1:0x00000001 a2:0x00008000 a3:0x8 Exception - Breakpoint Cause - 0x10000024 Status - 0x00088613 Thread ID - 0x04B35961 t0:0x880E0000 t1:0x00000400 t2:0x00000400 t3:0x0 Thread ID - 0x04B31767 BadVAddr - 0xC8931140 zr:0x00000000 at:0x2008FF00 v0:0x00000400 v1:0x8 Th Name - audiot2 t4:0x09F6FE78 t5:0x00088613 t6:0x0880CA94 t7:0x0 Th Name - audiot3 Status - 0x00088613 a0:0x00000001 a1:0x00000001 a2:0x00008000 a3:0x8 EPC - 0x08842964 s0:0x08970758 s1:0x08978758 s2:0x08978760 s3:0x0 EPC - 0x08842964 zr:0x00000000 at:0x2008FF00 v0:0x00000400 v1:0x8 t0:0x880E0000 t1:0x00000400 t2:0x00000400 t3:0x0 Cause - 0x10000024 s4:0x00008001 s5:0x00000001 s6:0x00008000 s7:0x0 Cause - 0x10000024 a0:0x00000001 a1:0x00000001 a2:0x00008000 a3:0x8 t4:0x09FF4E88 t5:0x00088613 t6:0x08842964 t7:0x0 BadVAddr - 0xC8931140 t8:0x800201AB t9:0x00000000 k0:0x09F6FF00 k1:0x0 BadVAddr - 0xC8931140 t0:0x880E0000 t1:0x00000400 t2:0x00000400 t3:0x0 s0:0x089797F8 s1:0x08980800 s2:0x089807F8 s3:0x0 Status - 0x00088613 gp:0x08878330 sp:0x09F6FE78 fp:0x08970000 ra:0x0 Status - 0x00088613 t4:0x09FE4E88 t5:0x00088613 t6:0x08842908 t7:0x0 s4:0x00000000 s5:0x089787F8 s6:0x08980000 s7:0xD zr:0x00000000 at:0x2008FF00 v0:0x00000400 v1:0x8 0x0880CA94: 0x0000004D 'M...' - break 0x1 zr:0x00000000 at:0x2008FF00 v0:0x00000400 v1:0x8 s0:0x0897B7F8 s1:0x08980818 s2:0x08980810 s3:0x0 t8:0x800201AB t9:0x00000000 k0:0x09FF4F00 k1:0x0 a0:0x00000001 a1:0x00000001 a2:0x00008000 a3:0x8 a0:0x00000001 a1:0x00000001 a2:0x00008000 a3:0x8 s4:0x00000002 s5:0x089787F8 s6:0x08980000 s7:0xD gp:0x08878330 sp:0x09FF4E88 fp:0x09FF4EB0 ra:0x0 t0:0x880E0000 t1:0x00000400 t2:0x00000400 t3:0x0 t0:0x880E0000 t1:0x00000400 t2:0x00000400 t3:0x0 t8:0x800201AB t9:0x00000000 k0:0x09FE4F00 k1:0x0 0x08842964: 0x0000004D 'M...' - break 0x1 t4:0x09FD4E88 t5:0x00088613 t6:0x08842964 t7:0x0 t4:0x09F7FE88 t5:0x00088613 t6:0x08842964 t7:0x0 gp:0x08878330 sp:0x09FE4E88 fp:0x09FE4EB0 ra:0x0 s0:0x0897D7F8 s1:0x08980830 s2:0x08980828 s3:0x0 s0:0x0897F7F8 s1:0x08980848 s2:0x08980840 s3:0x0 0x08842908: 0x0000004D 'M...' - break 0x1 s4:0x00000004 s5:0x089787F8 s6:0x08980000 s7:0xD s4:0x00000006 s5:0x089787F8 s6:0x08980000 s7:0xD t8:0x800201AB t9:0x00000000 k0:0x09FD4F00 k1:0x0 t8:0x800201AB t9:0x00000000 k0:0x09F7FF00 k1:0x0 gp:0x08878330 sp:0x09FD4E88 fp:0x09FD4EB0 ra:0x0 gp:0x08878330 sp:0x09F7FE88 fp:0x09F7FEB0 ra:0x0 0x08842964: 0x0000004D 'M...' - break 0x1 0x08842964: 0x0000004D 'M...' - break 0x1 I added sceKernelDelayThread(1sec ); that solves it... But it's better to be perfect
__________________
Hardware Alarm Suite II v2.7 bld 1727 (1730 Latest)|Academic Aid 6.R769 w/ Motion|LocoRoco Motion Plugin|XmbController 1.61|More(32) TweakDISPLAY(NOW OUT!) | PaintOnXMB v1
Last edited by Mr305; 08-10-2008 at 12:33 PM.. |
|
|
|
|
|
#22 | |
![]() ![]() Developer
|
Quote:
__________________
Hardware Alarm Suite II v2.7 bld 1727 (1730 Latest)|Academic Aid 6.R769 w/ Motion|LocoRoco Motion Plugin|XmbController 1.61|More(32) TweakDISPLAY(NOW OUT!) | PaintOnXMB v1
|
|
|
|
|
|
|
#23 | |
![]() ![]() Developer
|
It's hard to say without seeing the external code.
I can tell you that I use pgeWav and all the dialogs without issue.
__________________
![]() Check out my homebrew & C tutorials at http://insomniac.0x89.org/ Coder formerly known as Insomniac197 Quote:
|
|
|
|
|
|
|
#24 | |
![]() ![]() Developer
|
Quote:
__________________
Hardware Alarm Suite II v2.7 bld 1727 (1730 Latest)|Academic Aid 6.R769 w/ Motion|LocoRoco Motion Plugin|XmbController 1.61|More(32) TweakDISPLAY(NOW OUT!) | PaintOnXMB v1
|
|
|
|
|
|
|
#25 | |
![]() ![]() Developer
|
That would be exactly the problem.
If you have a newish newlib install use: Code:
PSP_HEAP_SIZE_KB(-1024); Code:
PSP_HEAP_SIZE_KB(20480);
__________________
![]() Check out my homebrew & C tutorials at http://insomniac.0x89.org/ Coder formerly known as Insomniac197 Quote:
|
|
|
|
|
|
|
#26 |
![]() ![]() Developer
|
pgeWav* Sound =pgeWavLoadMemory(Sound_s tart,Sound_size); [ignore the space]
I get exception at {with rel. address} Code:
memcpy. ??:0 ![]() This is not the first time I have worked with memoryloading
__________________
Hardware Alarm Suite II v2.7 bld 1727 (1730 Latest)|Academic Aid 6.R769 w/ Motion|LocoRoco Motion Plugin|XmbController 1.61|More(32) TweakDISPLAY(NOW OUT!) | PaintOnXMB v1
|
|
|
|
|
|
#27 | |
![]() |
Quote:
Thanks Luke |
|
|
|
|
|
|
#28 | ||
![]() ![]() Developer
|
Quote:
What are you passing as the arguments and where do you get that information from?
__________________
![]() Check out my homebrew & C tutorials at http://insomniac.0x89.org/ Coder formerly known as Insomniac197 Quote:
|
||
|
|
|
|
|
#29 |
![]() ![]() Developer
|
It a bin2o'd wav. Works fine using normal loading...
__________________
Hardware Alarm Suite II v2.7 bld 1727 (1730 Latest)|Academic Aid 6.R769 w/ Motion|LocoRoco Motion Plugin|XmbController 1.61|More(32) TweakDISPLAY(NOW OUT!) | PaintOnXMB v1
|
|
|
|
|
|
#30 |
![]() ![]() Developer
|
Got a question,
Is there any similar function to Code:
{ //happens once
pgeWavLoop(0); //once
pgeWavPlay(pgesoundfile);
}
Code:
if (!pgeWavIsPlaying(pgesoundfile))
{
DoThenexthing();
}
![]() Any solutions?
__________________
Hardware Alarm Suite II v2.7 bld 1727 (1730 Latest)|Academic Aid 6.R769 w/ Motion|LocoRoco Motion Plugin|XmbController 1.61|More(32) TweakDISPLAY(NOW OUT!) | PaintOnXMB v1
|
|
|
|
![]() |
| Tags |
| release , wavloader |
| Thread Tools | |
|
|