QJ.NET | Videos | Forums | iPhone | MMORPG | Nintendo DS | Wii | PlayStation 3 | PSP | Xbox 360 | PC | Downloads | Contact Us
Forums | Gaming News | Videos | Downloads | Today's Posts | Mark Forums Read | Chat | FAQ | Members List | Contact

QJ.net Game Discussion - PSP, Xbox, Wii, PS3, PSP Homebrew, and PSP Guides

Go Back   QJ.net Game Discussion - PSP, Xbox, Wii, PS3, PSP Homebrew, and PSP Guides > Developers Corner > PSP Development, Hacks, and Homebrew > PSP Development Forum
The above video goes away if you are a member and logged in, so log in now!

[RELEASE] Wavloader

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 ...

Reply
 
LinkBack Thread Tools
Old 08-18-2006, 12:09 PM   #1

Developer
 
Join Date: Mar 2006
Posts: 1,026
Trader Feedback: 0
Default [RELEASE] Wavloader

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:
tshirtz: what is irshell ??
Atarian_: it's where people who work for the IRS go when they die
Insert_Witty_Name is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 08-18-2006, 12:12 PM   #2
 
xsorifc28's Avatar
 
Join Date: Jun 2006
Location: Removable Disk (G:)
Posts: 1,698
Trader Feedback: 0
Default

nice..i like mp3s better lol.
__________________
[CENTER]
[_ıииeя_тυяκ*_]
Turkish Power >_<
[/CENTER]
xsorifc28 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 08-18-2006, 12:18 PM   #3
Enter Custom Title
 
SpiderJames's Avatar
 
Join Date: Jul 2005
Real First Name: James
Location: Chicago
Just Played: MLB 09 the Show
Posts: 4,435
Trader Feedback: 0
Default

very nice, cant wait for your next release
SpiderJames is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 08-18-2006, 02:07 PM   #4
 
trapdogg's Avatar
 
Join Date: Aug 2006
Posts: 27
Trader Feedback: 0
Default

"error connection to host " i need some help with this thing
trapdogg is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 08-18-2006, 02:09 PM   #5

Developer
 
Join Date: Mar 2006
Posts: 1,026
Trader Feedback: 0
Default

Quote:
Originally Posted by trapdogg
"error connection to host " i need some help with this thing
Do you need help downloading it, using it, or compiling the samples?
__________________

Check out my homebrew & C tutorials at http://insomniac.0x89.org/
Coder formerly known as Insomniac197

Quote:
tshirtz: what is irshell ??
Atarian_: it's where people who work for the IRS go when they die
Insert_Witty_Name is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 08-18-2006, 03:20 PM   #6
No longer a community member.
 
Join Date: Jan 2006
Posts: 2
Trader Feedback: 0
Default

Finally, I can play my .wav music on my PSP! Thanks, can't wait for the next release. Hopefully you can put in nice graphics inside the next version. I'll help you if you need any help.
xploren is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 08-18-2006, 10:37 PM   #7

Developer
 
Join Date: Jul 2006
Posts: 262
Trader Feedback: 0
Default

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.
the_darkside_986 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 08-19-2006, 04:52 AM   #8

Developer
 
Join Date: Mar 2006
Posts: 1,026
Trader Feedback: 0
Default

Quote:
Originally Posted by Appleseed629
Finally, I can play my .wav music on my PSP! Thanks, can't wait for the next release. Hopefully you can put in nice graphics inside the next version. I'll help you if you need any help.
Why would a library need good graphics?

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:
tshirtz: what is irshell ??
Atarian_: it's where people who work for the IRS go when they die
Insert_Witty_Name is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 06-11-2008, 11:29 AM   #9

Developer
 
Mr305's Avatar
 
Join Date: Nov 2006
Posts: 1,521
Trader Feedback: 0
Default

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?
Mr305 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 06-11-2008, 11:31 AM   #10

Developer
 
Mr305's Avatar
 
Join Date: Nov 2006
Posts: 1,521
Trader Feedback: 0
Default

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.
Mr305 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 06-11-2008, 12:04 PM   #11

Developer
 
Join Date: Mar 2006
Posts: 1,026
Trader Feedback: 0
Default

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;
}
This is the sample that comes with PGE for pgeWav usage.

Obviously it won't compile because it relies on the rest of PGE, but it should show how it's used etc.
Attached Files
File Type: zip pgeWav.zip‎ (3.8 KB, 8 views)
__________________

Check out my homebrew & C tutorials at http://insomniac.0x89.org/
Coder formerly known as Insomniac197

Quote:
tshirtz: what is irshell ??
Atarian_: it's where people who work for the IRS go when they die
Insert_Witty_Name is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 06-11-2008, 12:13 PM   #12

Developer
 
Mr305's Avatar
 
Join Date: Nov 2006
Posts: 1,521
Trader Feedback: 0
Default

Quote:
Originally Posted by Insert_Witty_Name View Post
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;
}
This is the sample that comes with PGE for pgeWav usage.

Obviously it won't compile because it relies on the rest of PGE, but it should show how it's used etc.

Sounds nice... BUT... Switching to PGE for pgeWav

Is any independent version possible?
Mr305 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 06-11-2008, 12:30 PM   #13
PSP Developer On Break
 

 
My Mood: Bashful
Join Date: Jan 2008
Real First Name: [The]Cobra
Location: New York
Just Played: GameLive Shell
Posts: 587
Trader Feedback: 0
Default

cool application very useful for me
__________________
Project:GameLive-Shell(Perc:19% | Ver: V0.1)
thecobra is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 06-11-2008, 12:49 PM   #14

Developer
 
Join Date: Mar 2006
Posts: 1,026
Trader Feedback: 0
Default

Quote:
Originally Posted by Mr305 View Post
Sounds nice... BUT... Switching to PGE for pgeWav

Is any independent version possible?
The attached files ARE independent.

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:
tshirtz: what is irshell ??
Atarian_: it's where people who work for the IRS go when they die
Insert_Witty_Name is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 06-11-2008, 01:30 PM   #15

Developer
 
Mr305's Avatar
 
Join Date: Nov 2006
Posts: 1,521
Trader Feedback: 0
Default

Quote:
Originally Posted by Insert_Witty_Name View Post
The attached files ARE independent.

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?
Ha ha

No mikmod = 200K smaller EBOOT

Thanks!
-
Werent you part of triEngine?
Mr305 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 06-11-2008, 01:37 PM   #16

Developer
 
Join Date: Mar 2006
Posts: 1,026
Trader Feedback: 0
Default

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:
tshirtz: what is irshell ??
Atarian_: it's where people who work for the IRS go when they die
Insert_Witty_Name is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 06-12-2008, 05:15 AM   #17
 
MiKeY188's Avatar
 
Join Date: Apr 2008
Location: Ireland
Posts: 979
Trader Feedback: 0
Default

Yes i get that problem too
But nice im going to try it out!
MiKeY188 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 06-12-2008, 08:29 AM   #18

Developer
 
Mr305's Avatar
 
Join Date: Nov 2006
Posts: 1,521
Trader Feedback: 0
Default

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
Mr305 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 06-12-2008, 08:55 AM   #19

Developer
 
Join Date: Mar 2006
Posts: 1,026
Trader Feedback: 0
Default

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:
tshirtz: what is irshell ??
Atarian_: it's where people who work for the IRS go when they die
Insert_Witty_Name is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 08-10-2008, 12:18 PM   #20

Developer
 
Mr305's Avatar
 
Join Date: Nov 2006
Posts: 1,521
Trader Feedback: 0
Default

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
As a temporary solution:
I added sceKernelDelayThread(1sec ); that solves it...

But it's better to be perfect

Last edited by Mr305; 08-10-2008 at 12:33 PM..
Mr305 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 08-10-2008, 02:04 PM   #21
Local Tech
 
joseph10444's Avatar
 
Join Date: Oct 2007
Real First Name: Joe
Location: home
Just Played: rockband
Posts: 1,822
Trader Feedback: 0
Default

cool tyvm
can i use this in irshell to read WAV extensions?
joseph10444 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 08-10-2008, 02:45 PM   #22

Developer
 
Mr305's Avatar
 
Join Date: Nov 2006
Posts: 1,521
Trader Feedback: 0
Default

Quote:
Originally Posted by Mr305 View Post
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
As a temporary solution:
I added sceKernelDelayThread(1sec ); that solves it...

But it's better to be perfect
Buried Because of one post above me.
Mr305 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 08-10-2008, 03:53 PM   #23

Developer
 
Join Date: Mar 2006
Posts: 1,026
Trader Feedback: 0
Default

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:
tshirtz: what is irshell ??
Atarian_: it's where people who work for the IRS go when they die
Insert_Witty_Name is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 08-10-2008, 05:21 PM   #24

Developer
 
Mr305's Avatar
 
Join Date: Nov 2006
Posts: 1,521
Trader Feedback: 0
Default

Quote:
Originally Posted by Insert_Witty_Name View Post
It's hard to say without seeing the external code.

I can tell you that I use pgeWav and all the dialogs without issue.
PSP_HEAP_SIZE_MAX() be the cause of the problem?
Mr305 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 08-11-2008, 05:36 AM   #25

Developer
 
Join Date: Mar 2006
Posts: 1,026
Trader Feedback: 0
Default

That would be exactly the problem.

If you have a newish newlib install use:

Code:
PSP_HEAP_SIZE_KB(-1024);
Or something like this, if not:

Code:
PSP_HEAP_SIZE_KB(20480);
PSP_HEAP_SIZE_MAX() breaks it because it doesn't leave any space available for the threads to be created.
__________________

Check out my homebrew & C tutorials at http://insomniac.0x89.org/
Coder formerly known as Insomniac197

Quote:
tshirtz: what is irshell ??
Atarian_: it's where people who work for the IRS go when they die
Insert_Witty_Name is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 08-11-2008, 11:01 AM   #26

Developer
 
Mr305's Avatar
 
Join Date: Nov 2006
Posts: 1,521
Trader Feedback: 0
Default

pgeWav* Sound =pgeWavLoadMemory(Sound_s tart,Sound_size); [ignore the space]

I get exception at {with rel. address}
Code:
memcpy.
??:0
Something wrong with this function?
This is not the first time I have worked with memoryloading
Mr305 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 08-13-2008, 06:08 AM   #27
 
Join Date: Dec 2007
Location: East Midlands, UK
Posts: 66
Trader Feedback: 0
Default

Quote:
Originally Posted by Insert_Witty_Name View Post
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
Brilliant just what i need, loving it.
Thanks
Luke
lukespalding is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 08-13-2008, 08:08 AM   #28

Developer
 
Join Date: Mar 2006
Posts: 1,026
Trader Feedback: 0
Default

Quote:
Originally Posted by Mr305 View Post
pgeWav* Sound =pgeWavLoadMemory(Sound_s tart,Sound_size); [ignore the space]

I get exception at {with rel. address}
Code:
memcpy.
??:0
Something wrong with this function?
This is not the first time I have worked with memoryloading
It works fine with my testing.

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:
tshirtz: what is irshell ??
Atarian_: it's where people who work for the IRS go when they die
Insert_Witty_Name is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 08-13-2008, 08:49 AM   #29

Developer
 
Mr305's Avatar
 
Join Date: Nov 2006
Posts: 1,521
Trader Feedback: 0
Default

Quote:
Originally Posted by Insert_Witty_Name View Post
It works fine with my testing.

What are you passing as the arguments and where do you get that information from?
It a bin2o'd wav. Works fine using normal loading...
Mr305 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 08-17-2008, 05:28 AM   #30

Developer
 
Mr305's Avatar
 
Join Date: Nov 2006
Posts: 1,521
Trader Feedback: 0
Default

Got a question,

Is there any similar function to

Code:
{ //happens once 
pgeWavLoop(0); //once
pgeWavPlay(pgesoundfile);
}
Code:
if (!pgeWavIsPlaying(pgesoundfile))
{
DoThenexthing();
}
I use sceKernelDelayThread but that makes things LOOK un-professional

Any solutions?
Mr305 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Tags
release , wavloader

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off



All times are GMT -8. The time now is 12:36 AM.



Use of this Web site constitutes acceptance of the TERMS & CONDITIONS and PRIVACY POLICY
Copyright © 2009, QJ.NET. All Rights Reserved.
Contact Us